修正了python版本的空间复杂度的描述

This commit is contained in:
roylx
2023-02-27 13:51:47 -07:00
committed by GitHub
parent 95f200bb89
commit 94d4af7d91

View File

@ -476,6 +476,7 @@ class Solution {
## Python
> 递归法
> 常量空间,递归产生的栈不算
```python
# Definition for a binary tree node.
@ -521,7 +522,9 @@ class Solution:
```
> 迭代法-中序遍历-不使用额外空间,利用二叉搜索树特性
> 迭代法-中序遍历
> 利用二叉搜索树特性,在历遍过程中更新结果,一次历遍
> 但需要使用额外空间存储历遍的节点
```python
class Solution:
def findMode(self, root: TreeNode) -> List[int]: