摘要: 今天的题目就是二叉树的前中后序遍历,目前只写了递归方法,之后再补迭代方法。 ## 题目:[144. 二叉树的前序遍历](https://leetcode.cn/problems/binary-tree-preorder-traversal/) ### 思路: 前序遍历:根-左-右 ### 代码1: 阅读全文
posted @ 2023-08-08 21:10 WtcSky 阅读(57) 评论(0) 推荐(0)