We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0cd0897 commit 31aa665Copy full SHA for 31aa665
src/main/java/com/fishercoder/solutions/_259.java
@@ -21,7 +21,7 @@ public int threeSumSmaller(int[] nums, int target) {
21
int sum = nums[i] + nums[left] + nums[right];
22
if (sum < target) {
23
result += right - left;//this line is key!
24
- left++;
+ left++;//then increment left to continue to see all possibilities
25
} else {
26
right--;
27
}
0 commit comments