iterative and recursive solution
We know that the in-order traversal sequence of a binary search tree is sorted, thus we can use it solve the problem.
recursive and iterative ways to solve this problem
Recursive and iterative solution
A classic binary search example
Variant solution of binary search