Google Interview Question

basic tree implementation, and a weirder medium difficulty one afterwards