Pregunta de entrevista de Amazon

same tree leetcode question (easy)