mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-08 16:54:50 +08:00
Update 二叉树的迭代遍历.md
This commit is contained in:
@ -258,6 +258,8 @@ class Solution:
|
|||||||
if node.left:
|
if node.left:
|
||||||
stack.append(node.left)
|
stack.append(node.left)
|
||||||
return result
|
return result
|
||||||
|
```
|
||||||
|
```python
|
||||||
|
|
||||||
# 中序遍历-迭代-LC94_二叉树的中序遍历
|
# 中序遍历-迭代-LC94_二叉树的中序遍历
|
||||||
class Solution:
|
class Solution:
|
||||||
@ -279,6 +281,8 @@ class Solution:
|
|||||||
# 取栈顶元素右结点
|
# 取栈顶元素右结点
|
||||||
cur = cur.right
|
cur = cur.right
|
||||||
return result
|
return result
|
||||||
|
```
|
||||||
|
```python
|
||||||
|
|
||||||
# 后序遍历-迭代-LC145_二叉树的后序遍历
|
# 后序遍历-迭代-LC145_二叉树的后序遍历
|
||||||
class Solution:
|
class Solution:
|
||||||
|
Reference in New Issue
Block a user