0–1 BFS

Computes shortest paths with a deque when every edge weight is zero or one.

Intermediategraph0–1 BFSvisualization
Loading visualization…