Verify a tree is BST or not.