Walmart interview question

Check if a tree is BST