Mental Model
BFS explores all neighbors of a node before moving to the next level, like spreading out evenly layer by layer.
Analogy: Imagine you are in a building and want to visit every room floor by floor, starting from the entrance. You first visit all rooms on the first floor, then all rooms on the second floor, and so on.
Start node: 1 Graph edges: 1 -> 2, 1 -> 3 2 -> 4 3 -> 5 Graph: 1 -> 2 -> 4 ↓ ↓ 3 -> 5 Queue starts with: [1] ↑
