Least You Need to Know: BFS Layers, Unweighted Shortest Paths, and Multi-Source Search
Open lesson
Breadth-first search works on **unweighted** graphs because it explores states in layers of equal edge distance. That layer structure is the interview reason BFS gives shortest-path lengths when every move costs the same.