Amazon interview question

how to check if a binary tree is BST