Uber interview question

Check whether a tree is a valid binary search tree