Informatica Interview Question

Write a code to check whether a binary tree is in BST or not.