GlobalLogic interview question

Level order traversal