File tree 1 file changed +3
-3
lines changed 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -71,16 +71,16 @@ class Solution {
71
71
//
72
72
// 1) Traverse the array one by one
73
73
// 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.
76
76
//
77
77
vector<int > twoSum (vector<int > &numbers, int target) {
78
78
unordered_map<int , int > m;
79
79
vector<int > result;
80
80
for (int i=0 ; i<numbers.size (); i++){
81
81
// not found the second one
82
82
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
84
84
m[target - numbers[i]] = i;
85
85
}else {
86
86
// found the second one
You can’t perform that action at this time.
0 commit comments