Step 1/0
Complexity
Best:O(V+E)
Average:O(V+E)
Worst:O(V+E)
Space:O(V)
Description
Explores a graph level by level, visiting all neighbors before moving deeper. Uses a queue to track the next node to visit.
When to use
Finding shortest paths in unweighted graphs. Level-order traversal. Useful in social networks, GPS navigation, web crawlers.