Merge pull request #2434 from sss1h/master

Update 0090.子集II.md
This commit is contained in:
程序员Carl
2024-02-12 20:01:26 +08:00
committed by GitHub
2 changed files with 1 additions and 8 deletions

View File

@ -158,13 +158,6 @@ public:
其实这道题目的知识点我们之前都讲过了如果之前讲过的子集问题和去重问题都掌握的好这道题目应该分分钟AC。
当然本题去重的逻辑,也可以这么写
```cpp
if (i > startIndex && nums[i] == nums[i - 1] ) {
continue;
}
```
## 其他语言版本

View File

@ -69,7 +69,7 @@
代码很简单,但是思路却比较难。还需要反复琢磨。
针对[贪心算法:最大子序和](https://programmercarl.com/0053.最大子序和.html)文章中给出的贪心代码如下;
```
```cpp
class Solution {
public:
int maxSubArray(vector<int>& nums) {