mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-08 16:54:50 +08:00
Merge pull request #2555 from zp-coffee/master
更新了 二叉树的迭代遍历.md 的排版格式和修改了一个错别字
This commit is contained in:
@ -117,7 +117,7 @@ public:
|
|||||||
|
|
||||||
### 后序遍历(迭代法)
|
### 后序遍历(迭代法)
|
||||||
|
|
||||||
再来看后序遍历,先序遍历是中左右,后续遍历是左右中,那么我们只需要调整一下先序遍历的代码顺序,就变成中右左的遍历顺序,然后在反转result数组,输出的结果顺序就是左右中了,如下图:
|
再来看后序遍历,先序遍历是中左右,后序遍历是左右中,那么我们只需要调整一下先序遍历的代码顺序,就变成中右左的遍历顺序,然后在反转result数组,输出的结果顺序就是左右中了,如下图:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
Reference in New Issue
Block a user