dijkstra

Find shortest path from current node to all other nodes in graph.

How can we find the shortest path?

Intuitively we have to go through the adjacent nodes, from current node, in order to reach nodes not connected directly. This means we kind of have to use BFS (but also not really).

  1. Keep finding paths on shortest distances.
  2. When we find paths, continue along it, until it no longer fits in set of shortest distances.