Google Interview Question

"write a function stating whether or not an input tree was a valid binary search tree"