Tripadvisor interview question

code binary search tree in java