Bloomberg Interview Question

LC Medium question about binary trees.