BFS

2 problems using this pattern

About this pattern:

Breadth-first search for shortest path and level-order traversal problems.

Complexity Range

Time Complexity

O(n) (1 problem)
O(V + E) (1 problem)

Space Complexity

O(n) (1 problem)
O(V) (1 problem)

Problems Using BFS

← Back to All Patterns