Find Closest Value in BST

1 · Maksym Postument · Aug. 10, 2021, 5:02 p.m.
Hello! Today we will look at how to find the nearest value in BST. The input is given a binary tree and a number, and you need to find the closest number to the given one. For example, we have a tree: 6 / \ 4 10 / \ \ 2 5 23 And the number 13. You need to find the number that is closest to 13 in the tree....