Skip to content

Commit

Permalink
fix #96
Browse files Browse the repository at this point in the history
  • Loading branch information
haoel committed Feb 29, 2016
1 parent 4be202f commit dfb546a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion algorithms/cpp/3Sum/3Sum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ vector<vector<int> > threeSum(vector<int> &num) {
result.push_back(v);
// Continue search for all triplet combinations summing to zero.
//skip the duplication
while(low<n && num[low]==num[low+1]) low++;
while(low<n-1 && num[low]==num[low+1]) low++;
while(high>0 && num[high]==num[high-1]) high--;
low++;
high--;
Expand Down

0 comments on commit dfb546a

Please sign in to comment.