Amazon Interview Question

Write a code to find out if a tree is a binary search tree.