Bloomberg Interview Question

Question that was a variation of binary tree.