Graphs
This section contains common algorithms for graph manipulation. Graphs are often used to represent data whose elements are interconnected pairwise, such as a map with roads connecting cities, or a network with nodes connected by links.
- Graph representation: matrix and adjacency list
- Graph traversal: DFS, BFS and topological sort
- Components: connected components, articulation points, flood fill
- Shortest paths: single path, all paths, negative distances
- Minimal spanning trees: using disjoint sets or BFS
- Network flow: maximum flow