Amazon interview question

find if binary tree is bst.