Learn
Practice
Newsletter
Resources
F
Toggle theme
0
F
Toggle theme
0
Toggle menu
← Back to All Animations
Flatten Binary Tree to Linked List
Bookmark
Input
Example Tree
Simple Tree
Right-Skewed
Left-Skewed
Custom
tree
=
[1, 2, 5, 3, 4, null, 6]
1
2
5
3
4
6
current
predecessor
algo
master
.
io
Step:
Start: Flatten binary tree to linked list using Morris Traversal
Variable
Value
root
"Node(1)"
current
-
Variable
Value
predecessor
-
0 / 15
Input
Example Tree
Simple Tree
Right-Skewed
Left-Skewed
Custom
tree
=
[1, 2, 5, 3, 4, null, 6]
0 / 15
1
2
5
3
4
6
current
predecessor
algo
master
.
io
Step:
Start: Flatten binary tree to linked list using Morris Traversal
Visualization
Variables