Skip to content

Commit 2ba4a7d

Browse files
author
lucifer
committed
feat: 84 85 611
1 parent 32efa1c commit 2ba4a7d

5 files changed

+11
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ leetcode 题解,记录自己的 leetcode 解题之路。
343343
- [0547. 朋友圈](./problems/547.friend-circles.md)
344344
- [0560. 和为 K 的子数组](./problems/560.subarray-sum-equals-k.md)
345345
- [0609. 在系统中查找重复文件](./problems/609.find-duplicate-file-in-system.md)
346-
- [0611. 有效三角形的个数](./problems/611.valid-triangle-number.md)
346+
- [0611. 有效三角形的个数](./problems/611.valid-triangle-number.md) 👍
347347
- [0673. 最长递增子序列的个数](./problems/673.number-of-longest-increasing-subsequence.md)
348348
- [0686. 重复叠加字符串匹配](./problems/686.repeated-string-match.md)
349349
- [0718. 最长重复子数组](./problems/718.maximum-length-of-repeated-subarray.md)

SUMMARY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,10 @@
190190
- [0516. 最长回文子序列](./problems/516.longest-palindromic-subsequence.md)
191191
- [0513. 找树左下角的值](./problems/513.find-bottom-left-tree-value.md) 91
192192
- [0518. 零钱兑换 II](./problems/518.coin-change-2.md)
193-
- [0547. 朋友圈](./problems/547.friend-circles.md) 👍
193+
- [0547. 朋友圈](./problems/547.friend-circles.md)
194194
- [0560. 和为 K 的子数组](./problems/560.subarray-sum-equals-k.md)
195195
- [0609. 在系统中查找重复文件](./problems/609.find-duplicate-file-in-system.md)
196-
- [0611. 有效三角形的个数](./problems/611.valid-triangle-number.md)
196+
- [0611. 有效三角形的个数](./problems/611.valid-triangle-number.md) 👍
197197
- [0673. 最长递增子序列的个数](./problems/673.number-of-longest-increasing-subsequence.md)
198198
- [0686. 重复叠加字符串匹配](./problems/686.repeated-string-match.md)
199199
- [0714. 买卖股票的最佳时机含手续费](./problems/714.best-time-to-buy-and-sell-stock-with-transaction-fee.md) 👍

problems/611.valid-triangle-number.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ for i in range(n - 2):
124124

125125
由于 K 不会后退,因此最内层循环总共最多执行 N 次,因此总的时间复杂度为 $O(N ^ 2)$。
126126

127+
这种技巧在很多题目中都出现过,值得引起大家的重视。比如 [84. 柱状图中最大的矩形](https://github.com/azl397985856/leetcode/blob/master/problems/84.largest-rectangle-in-histogram.md) 中的 优化中心扩展法
128+
127129
> 这个复杂度分析有点像单调栈,大家可以结合起来理解。
128130
129131
### 关键点分析

problems/84.largest-rectangle-in-histogram.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,8 @@ class Solution:
216216

217217
## 相关题目
218218

219-
- [42.trapping-rain-water](https://github.com/azl397985856/leetcode/blob/master/problems/42.trapping-rain-water.md)
219+
- [42. 接雨水](https://github.com/azl397985856/leetcode/blob/master/problems/42.trapping-rain-water.md)
220+
- [85. 最大矩形](https://github.com/azl397985856/leetcode/blob/master/problems/85.maximal-rectangle.md)
220221

221222
大家对此有何看法,欢迎给我留言,我有时间都会一一查看回答。更多算法套路可以访问我的 LeetCode 题解仓库:https://github.com/azl397985856/leetcode 。 目前已经 37K star 啦。
222223
大家也可以关注我的公众号《力扣加加》带你啃下算法这块硬骨头。

problems/85.maximal-rectangle.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,9 @@ class Solution:
9393
- 时间复杂度:$O(M * N)$
9494
- 空间复杂度:$O(N)$
9595

96-
以上就是本文的全部内容了。大家对此有何看法,欢迎给我留言,我有时间都会一一查看回答。更多算法套路可以访问我的 LeetCode 题解仓库:https://github.com/azl397985856/leetcode 。 目前已经 38K star 啦。大家也可以关注我的公众号《力扣加加》带你啃下算法这块硬骨头。
96+
## 相关题目
9797

98-
```
98+
- [42. 接雨水](https://github.com/azl397985856/leetcode/blob/master/problems/42.trapping-rain-water.md)
99+
- [84. 柱状图中最大的矩形](https://github.com/azl397985856/leetcode/blob/master/problems/84.largest-rectangle-in-histogram.md)
99100

100-
```
101+
以上就是本文的全部内容了。大家对此有何看法,欢迎给我留言,我有时间都会一一查看回答。更多算法套路可以访问我的 LeetCode 题解仓库:https://github.com/azl397985856/leetcode 。 目前已经 38K star 啦。大家也可以关注我的公众号《力扣加加》带你啃下算法这块硬骨头。

0 commit comments

Comments
 (0)