Amazon Interview Question

write a function to determine a BST