Bloomberg interview question

level order traversal