Tripadvisor interview question

Implement binary tree