Tripadvisor interview question

Symmetric tree