Paste CP-style edge lists and watch a force-directed graph build itself. Drag nodes, toggle directed and 0/1-indexed, then copy the adjacency list.
An edge list is the least readable format for a graph and the only one problems are ever stated in. Paste one into the Graph Visualizer and it lays the vertices out with a force simulation, so a tree looks like a tree and a cycle is visible as a cycle rather than as a row of number pairs.
Layout works by physics rather than by hierarchy. Every pair of nodes repels, every edge pulls its endpoints together, and velocity decays each tick until the arrangement settles. Drag any node and the simulation reheats, which is how you untangle a knot the automatic placement left behind.
Three property badges light up as the structure warrants: Tree, Has Cycle and Disconnected, alongside a connectivity badge that reads weakly connected on a directed graph. Cycles are found by a depth-first search colouring nodes white, grey and black, which is the standard way to distinguish a back edge from a forward one.
0 1 style pairs. Load Sample Tree moves to the next stored edge list, and you can paste your own with one edge per line.0 1 5 is an edge of weight 5. Mixing weighted and unweighted lines is fine, and the label only renders where a weight exists.Adjacency List
0: [1, 2] 1: [0, 3, 4] 2: [0, 5, 6] 3: [1] 4: [1] 5: [2] 6: [2]