Learn
Practice
Newsletter
Resources
F
Toggle theme
0
F
Toggle theme
0
Toggle menu
← Back to All Animations
Closest Binary Search Tree Value
Bookmark
Input
Standard
Between Nodes
Single Path
Custom
tree
=
[4, 2, 5, 1, 3]
,
target
=
3.7
4
2
5
1
3
Target:
3.7
Closest:
-
Diff:
-
algo
master
.
io
Step:
BST built. Find the value closest to target = 3.7
0 / 8
Input
Standard
Between Nodes
Single Path
Custom
tree
=
[4, 2, 5, 1, 3]
,
target
=
3.7
0 / 8
4
2
5
1
3
Target:
3.7
Closest:
-
Diff:
-
algo
master
.
io
Step:
BST built. Find the value closest to target = 3.7