Google interview question

Asked about some tree manipulations. Not particularly difficult.