Graph Algorithms

Back to Topics
Building Roads
bfs dfs forest counting
Building Teams
bicoloring dfs
Round Trip
cycle in undirected graph dfs
Shortest Routes I
single source shortest path dijkstra
Shortest Routes II
all pair shortes path floyd warshall
High Score
single source shortest path bellman ford
Flight Discount
single source shortest path dijkstra
Cycle Finding
negative cycle bellman ford
Round Trip II
dfs cycle in directed graph
Course Schedule
topological sort
Longest Flight Route
topological sort dp
Game Routes
topological sort dp
Planets Queries I
binary lifting
Road Reparation
minimum spanning tree kruskal
Flight Routes Check
strongly connected components
Planets and Kingdoms
strongly connected components
Coin Collector
condensation graph topological sort dp
Mail Delivery
euler tour - undirected
Teleporters Path
euler path - directed
Hamiltonian Flights
hamiltonian path bitmask dp
Knight's Tour
hamiltonian path heuristics
Download Speed
max flow min cut push relabel dinic
Police Chase
max flow min cut push relabel
School Dance
max flowbipartite matching hopkroft carp
Distinct Routes
max flow dinic path reconstruction