This theory is part of Premium
The full write-up (worked counting examples, the trap list and the interview playbook) unlocks with a Premium plan, along with every Pro visualizer.
See pricingBFS levels are distances: the first time a vertex is reached is by the fewest edges.
What this asks
Find the fewest edges between two vertices.
BFS levels are distances: record each vertex the first time it is reached.
The full write-up (worked counting examples, the trap list and the interview playbook) unlocks with a Premium plan, along with every Pro visualizer.
See pricing