Skip to content

Commit 01b82a9

Browse files
authored
Merge pull request azl397985856#525 from ToSnow/patch-3
2 parents 08326e2 + d91ea57 commit 01b82a9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

problems/220.contains-duplicate-iii.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,9 @@ public:
169169
buck[nth] = nums[i];
170170
if(i >= k)
171171
{
172-
buck.erase(nums[i - k] / mod);
172+
long long pos = nums[i - k] / mod;
173+
if(nums[i - k] < 0) pos--;
174+
buck.erase(pos);
173175
}
174176
}
175177
return false;

0 commit comments

Comments
 (0)