Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit430b8d3

Browse files
authored
Update 15-3Sum.js
right pointer should check with right + 1 position
1 parent01a2b36 commit430b8d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎javascript/15-3Sum.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var threeSum = function(nums) {
2525

2626
while(nums[left]==nums[left-1]){left++};
2727

28-
while(nums[right]==nums[right-1]){right--};
28+
while(nums[right]==nums[right+1]){right--};
2929

3030
}elseif(temp>0){right--}
3131
elseif(temp<0){left++}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp