Learn
Practice
Newsletter
Resources
Resume
New
F
Toggle theme
0
F
Toggle theme
0
Toggle menu
← Back to All Animations
Validate Binary Search Tree
Valid BST (Simple)
Invalid BST (Example)
Invalid BST (Subtle)
Valid BST (Complex)
Custom
tree
=
[2, 1, 3]
2
1
3
visited
current
unvisited
Step:
Start: Validate if tree is a valid BST
Variable
Value
root
"Node(2)"
Depth
Function Call
1
isValidBST(Node(2))
0 / 18
Valid BST (Simple)
Invalid BST (Example)
Invalid BST (Subtle)
Valid BST (Complex)
Custom
tree
=
[2, 1, 3]
0 / 18
2
1
3
visited
current
unvisited
Step:
Start: Validate if tree is a valid BST
Visualization
Variables