Amazon interview question

same tree leetcode question (easy)