8000 grammar (#259) · ulaszek-james/leetcode@36168cc · GitHub
[go: up one dir, main page]

Skip to content

Commit 36168cc

Browse files
authored
grammar (haoel#259)
1 parent 0c2f6da commit 36168cc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

algorithms/cpp/twoSum/twoSum.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,16 @@ class Solution {
4646
//
4747
// 1) Traverse the array one by one
4848
// 2) just put the `target - num[i]`(not `num[i]`) into the map
49-
// so, when we checking the next num[i], if we found it is exisited in the map.
50-
// which means we found the second one.
49+
// so, when we checking the next num[i], if we found it existed in the map,
50+
// it means we found the second one.
5151
//
5252
vector<int> twoSum(vector<int> &numbers, int target) {
5353
unordered_map<int, int> m;
5454
vector<int> result;
5555
for(int i=0; i<numbers.size(); i++){
5656
// not found the second one
5757
if (m.find(numbers[i])==m.end() ) {
58-
// store the first one poisition into the second one's key
58+
// store the first one position into the second one's key
5959
m[target - numbers[i]] = i;
6060
}else {
6161
// found the second one

0 commit comments

Comments
 (0)
0