We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 95f200b + 94d4af7 commit 76d84f8Copy full SHA for 76d84f8
problems/0501.二叉搜索树中的众数.md
@@ -476,6 +476,7 @@ class Solution {
476
## Python
477
478
> 递归法
479
+> 常量空间,递归产生的栈不算
480
481
```python
482
# Definition for a binary tree node.
@@ -521,7 +522,9 @@ class Solution:
521
522
```
523
524
-> 迭代法-中序遍历-不使用额外空间,利用二叉搜索树特性
525
+> 迭代法-中序遍历
526
+> 利用二叉搜索树特性,在历遍过程中更新结果,一次历遍
527
+> 但需要使用额外空间存储历遍的节点
528
529
class Solution:
530
def findMode(self, root: TreeNode) -> List[int]:
0 commit comments