Google interview question

a tree implementation question