Pergunta de entrevista da empresa Bloomberg

LC Medium question about binary trees.