Tripadvisor interview question

symmetric tree