Learn
Practice
Newsletter
Resources
Resume
New
F
Toggle theme
0
F
Toggle theme
0
Toggle menu
← Back to All Animations
Populating Next Right Pointers in Each Node II
Bookmark
Input
Perfect Binary Tree
Complete Binary Tree
Sparse Tree
Left-Skewed
Custom
tree
=
[1, 2, 3, 4, 5, null, 7]
1
2
3
4
5
7
Level 0
Level 1
Level 2
algo
master
.
io
Step:
Start: Connect nodes at each level using BFS
0 / 22
Input
Perfect Binary Tree
Complete Binary Tree
Sparse Tree
Left-Skewed
Custom
tree
=
[1, 2, 3, 4, 5, null, 7]
0 / 22
1
2
3
4
5
7
Level 0
Level 1
Level 2
algo
master
.
io
Step:
Start: Connect nodes at each level using BFS