Amazon interview question

Check whether a tree is a BST or not?