Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 31aa665

Browse files
committedOct 22, 2021
refactor 259
1 parent 0cd0897 commit 31aa665

File tree

1 file changed

+1
-1
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+1
-1
lines changed
 

‎src/main/java/com/fishercoder/solutions/_259.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public int threeSumSmaller(int[] nums, int target) {
2121
int sum = nums[i] + nums[left] + nums[right];
2222
if (sum < target) {
2323
result += right - left;//this line is key!
24-
left++;
24+
left++;//then increment left to continue to see all possibilities
2525
} else {
2626
right--;
2727
}

0 commit comments

Comments
 (0)
Failed to load comments.