Amazon interview question

Q: Question based on generic trees