Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Two_Pointers/015.3Sum/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
while (left<right && nums[left]==nums[left-1]) left++;
while (left<right && nums[right]==nums[right+1]) right--;
}
```
```
2. 对于最外层的循环,也是确定一个,先展开内层循环,再略过最外层的重复项。
```cpp
for (int a=0; a<nums.size(); a++)
{
inner loop;
while (nums[a]==nums[a+1]) a++;
}
```


[Leetcode Link](https://leetcode.com/problems/3sum)
[Leetcode Link](https://leetcode.com/problems/3sum)