Mental Model
BFS explores all neighbors of a node before moving to the next level of nodes. It spreads out evenly like ripples in water.
Analogy: Imagine dropping a stone in a pond. The ripples spread out evenly in circles, visiting all points at the same distance before moving further.
Graph:
1
/ \
2 3
| |
4 5
Queue: []
Visited: {}