Amazon Interview Question

Write code that will validate a binary search tree.