Bloomberg Interview Question

leetcode flattern tree