diff --git a/problems/二叉树的递归遍历.md b/problems/二叉树的递归遍历.md index 8d5a5985..92f342f0 100644 --- a/problems/二叉树的递归遍历.md +++ b/problems/二叉树的递归遍历.md @@ -191,7 +191,8 @@ class Solution: return [root.val] + left + right - +``` +```python # 中序遍历-递归-LC94_二叉树的中序遍历 class Solution: def inorderTraversal(self, root: TreeNode) -> List[int]: @@ -202,6 +203,9 @@ class Solution: right = self.inorderTraversal(root.right) return left + [root.val] + right +``` +```python + # 后序遍历-递归-LC145_二叉树的后序遍历 class Solution: