Google Interview Question

a tree implementation question