WD interview question

Binary tree operations