All Pairs Shortest Path

Synopsis

An all pairs shortest path algorithm discovers the shortest paths between all nodes in the graph. The main algorithm to do this is Floyd Warshall.

Video

  • Competitive Programming 4, section 4.5

Problem