Learn
Practice
Newsletter
Resources
F
Toggle theme
0
F
Toggle theme
0
Toggle menu
← Back to All Animations
Balanced Binary Tree
Balanced (Example 1)
Unbalanced (Example 2)
Complete Tree (Balanced)
Custom
tree
=
[3, 9, 20, null, null, 15, 7]
3
9
20
15
7
current
balanced
unbalanced
unvisited
Step:
Start: Check if binary tree is height-balanced
Variable
Value
root
"Node(3)"
Depth
Function Call
1
isBalanced(Node(3))
0 / 33
Balanced (Example 1)
Unbalanced (Example 2)
Complete Tree (Balanced)
Custom
tree
=
[3, 9, 20, null, null, 15, 7]
0 / 33
3
9
20
15
7
current
balanced
unbalanced
unvisited
Step:
Start: Check if binary tree is height-balanced
Visualization
Variables