File tree 3 files changed +8
-7
lines changed
3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -172,7 +172,7 @@ class Solution(object):
172
172
** 复杂度分析**
173
173
174
174
- 时间复杂度:$O(N)$
175
- - 空间复杂度:隐式调用栈的开销为 $O(N )$
175
+ - 空间复杂度:由于是平衡二叉树,因此隐式调用栈的开销为 $O(logN )$
176
176
177
177
更多题解可以访问我的 LeetCode 题解仓库:https://github.com/azl397985856/leetcode 。 目前已经 37K star 啦。
178
178
Original file line number Diff line number Diff line change @@ -192,11 +192,12 @@ class Solution:
192
192
193
193
## 相关题目
194
194
195
- - [ number-of-1-bits] ( https://leetcode-cn.com/problems/number-of-1-bits/ )
196
- - [ counting-bits] ( https://leetcode-cn.com/problems/counting-bits/ )
197
- - [ reverse-bits] ( https://leetcode-cn.com/problems/reverse-bits/ )
195
+ - [ 190. 颠倒二进制位] ( https://leetcode-cn.com/problems/reverse-bits/ ) (简单)
196
+ - [ 191. 位1的个数] ( https://leetcode-cn.com/problems/number-of-1-bits/ ) (简单)
197
+ - [ 338. 比特位计数] ( https://leetcode-cn.com/problems/counting-bits/ ) (中等)
198
+ - [ 1072. 按列翻转得到最大值等行数] ( https://leetcode-cn.com/problems/flip-columns-for-maximum-number-of-equal-rows/ ) (中等)
198
199
199
200
200
- 更多题解可以访问我的LeetCode题解仓库:https://github.com/azl397985856/leetcode 。 目前已经30K star啦。
201
+ 更多题解可以访问我的LeetCode题解仓库:https://github.com/azl397985856/leetcode 。 目前已经38K star啦。
201
202
202
203
关注公众号力扣加加,努力用清晰直白的语言还原解题思路,并且有大量图解,手把手教你识别套路,高效刷题。
Original file line number Diff line number Diff line change @@ -66,9 +66,9 @@ for i in range(M):
66
66
## 相关题目
67
67
68
68
- [ 200. 岛屿数量] ( https://github.com/azl397985856/leetcode/blob/master/problems/200.number-of-islands.md )
69
- - [ 695. 岛屿的最大面积] ( https://leetcode-cn.com/problems/max-area-of-island/solution/695-dao-yu-de-zui-da-mian-ji-dfspython3-by-fe-luci/ )
69
+ - [ 695. 岛屿的最大面积] ( https://leetcode-cn.com/problems/max-area-of-island/solution/695-dao-yu-de-zui-da-mian-ji-dfspython3-by-fe-luci/ ) (字节跳动原题)
70
70
- [ 1162. 地图分析] ( https://leetcode-cn.com/problems/as-far-from-land-as-possible/solution/python-tu-jie-chao-jian-dan-de-bfs1162-di-tu-fen-x/ )
71
- - 463 . 岛屿的周长
71
+ - 463.岛屿的周长
72
72
73
73
上面四道题都可以使用常规的 DFS 来做。 并且递归的方向都是上下左右四个方向。更有意思的是,都可以采用原地修改的方式,来减少开辟 visited 的空间。
74
74
You can’t perform that action at this time.
0 commit comments