Microsoft interview question

Check if a tree is BST or not.