Shortest paths

Problems on shortest paths, including unweighted and weighted graphs, single-source and all-pairs distances, negative edges and negative cycles, grids and mazes, and paths with extra state such as fuel or time.

The Graphs section of the library covers breadth-first search, 0-1 BFS, Dijkstra's algorithm, Bellman-Ford, SPFA and Floyd-Warshall. Related problem sets are under Dijkstra algorithm, Breadth-first search and Graphs.

Problems