Bloomberg Interview Question

level order traversal