Skip to content

Commit c1fff3a

Browse files
committed
fix typo
1 parent 2927e6e commit c1fff3a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

C++/contains-duplicate-ii.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class Solution {
99
if (lookup.find(nums[i]) == lookup.end()) {
1010
lookup[nums[i]] = i;
1111
} else {
12-
// It the value occurs before, check the difference.
12+
// If the value occurs before, check the difference.
1313
if (i - lookup[nums[i]] <= k) {
1414
return true;
1515
}

Python/contains-duplicate-ii.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def containsNearbyDuplicate(self, nums, k):
1111
if num not in lookup:
1212
lookup[num] = i
1313
else:
14-
# It the value occurs before, check the difference.
14+
# If the value occurs before, check the difference.
1515
if i - lookup[num] <= k:
1616
return True
1717
# Update the index of the value.

0 commit comments

Comments
 (0)