L2-011 玩转二叉树
时间: 2023-10-08 14:12:31 浏览: 98
二叉树的操作
L2-011 玩转二叉树是一道题目,题目要求给定一棵二叉树的中序遍历和前序遍历,然后将树做个镜面反转,最后输出反转后的层序遍历的序列。镜面反转指的是将所有非叶节点的左右孩子对换。题目给出了输入格式和输出格式的要求,并提供了一个样例。这道题目可以使用递归来实现,具体的方法可以参考引用和引用中的内容。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [L2-011. 玩转二叉树](https://blog.csdn.net/qq_27437781/article/details/64142763)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *3* [L2-011 玩转二叉树(建树+BFS)](https://blog.csdn.net/weixin_45564209/article/details/124350188)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文