graph
Graph
Ordered from silver through advanced.
Compressed sparse row [silver]
CSR.h. Adjacency stored as offsets and edges.
Disjoint set union [gold]
DSU.h. Parent and size, with path compression.DSU.py. The same structure in Python.323.cpp. A worked DSU problem.
Euler tour [gold]
EulerTour.h. Entry and exit times on a tree.euler_tour/. Solved Euler-tour problems.
Binary lifting [platinum]
binary_lifting/. Binary lifting solutions.
Small to large [platinum]
small_to_large_merging/. Small-to-large merging solutions.
DSU rollback [advanced]
DSURollback.h. Disjoint set union that can undo unions.dsu_rollback/. A solved rollback problem.
Eulerian path [advanced]
eulerian_path/. Eulerian-path solutions.
Strongly connected components [advanced]
kosaraju/. Kosaraju solutions.