8000 grammar (#259) · qinyafee/leetcode@2ee9ea1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2ee9ea1

Browse files
cad0pqinyafee
authored andcommitted
grammar (haoel#259)
1 parent 1ceaac7 commit 2ee9ea1

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
@@ -71,16 +71,16 @@ class Solution {
7171
//
7272
// 1) Traverse the array one by one
7373
// 2) just put the `target - num[i]`(not `num[i]`) into the map
74-
// so, when we checking the next num[i], if we found it is exisited in the map.
75-
// which means we found the second one.
74+
// so, when we checking the next num[i], if we found it existed in the map,
75+
// it means we found the second one.
7676
//
7777
vector<int> twoSum(vector<int> &numbers, int target) {
7878
unordered_map<int, int> m;
7979
vector<int> result;
8080
for(int i=0; i<numbers.size(); i++){
8181
// not found the second one
8282
if (m.find(numbers[i])==m.end() ) {
83-
// store the first one poisition into the second one's key
83+
// store the first one position into the second one's key
8484
m[target - numbers[i]] = i;
8585
}else {
8686
// found the second one

0 commit comments

Comments
 (0)
0