Use the definition of BST to solve the problem
I think this is an article worth to read😉
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