mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2026-02-02 18:39:09 +08:00
替换图片链接
This commit is contained in:
@@ -117,7 +117,7 @@ public:
|
||||
|
||||
再来看后序遍历,先序遍历是中左右,后序遍历是左右中,那么我们只需要调整一下先序遍历的代码顺序,就变成中右左的遍历顺序,然后在反转result数组,输出的结果顺序就是左右中了,如下图:
|
||||
|
||||

|
||||

|
||||
|
||||
**所以后序遍历只需要前序遍历的代码稍作修改就可以了,代码如下:**
|
||||
|
||||
|
||||
Reference in New Issue
Block a user