Pergunta de entrevista da empresa Meta

a leetcode question about binary tree.