Learn
Practice
Newsletter
Resources
F
Toggle theme
0
F
Toggle theme
0
Toggle menu
← Back to All Animations
Breadth First Search (Iterative)
Bookmark
Input
6 nodes
Cycle
Complete graph
Custom
graph
=
[[1,2],[3,4],[5],[5],[5],[]]
,
startNode
=
0
0
1
2
3
4
5
start
Queue
Result:
[]
Not visited
In queue
Visited
Current
algo
master
.
io
Step:
Start BFS from node 0 using queue
0 / 22
Input
6 nodes
Cycle
Complete graph
Custom
graph
=
[[1,2],[3,4],[5],[5],[5],[]]
,
startNode
=
0
0 / 22
0
1
2
3
4
5
start
Queue
Result:
[]
Not visited
In queue
Visited
Current
algo
master
.
io
Step:
Start BFS from node 0 using queue