Amazon interview question

Write a program to check of a binary tree is a binary search tree.