Pergunta de entrevista da empresa Amazon

same tree leetcode question (easy)