Amazon interview question

Tree level order traversal