Graph visualizer
Paste a graph in the standard CP format (n m on the first line, then u v [w] per edge). Auto-detects trees and picks a sensible layout.
··n=5 m=5weighted
header: n=5, m=5
Tips
- Header line is optional — bare edge lists work too.
- Comments: lines starting with # are ignored.
- Click a node to highlight its 1-hop neighbourhood; click empty space to clear.
- Tree detected? Layout snaps to BFS-rooted at node 1.
- Weighted? Edge labels show automatically.