BMW Group interview question

Determine whether a tree is a valid BST.