Pregunta de entrevista de Bloomberg

LC Medium question about binary trees.