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 @@ -46,16 +46,16 @@ class Solution {
46
46
//
47
47
// 1) Traverse the array one by one
48
48
// 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.
51
51
//
52
52
vector<int > twoSum (vector<int > &numbers, int target) {
53
53
unordered_map<int , int > m;
54
54
vector<int > result;
55
55
for (int i=0 ; i<numbers.size (); i++){
56
56
// not found the second one
57
57
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
59
59
m[target - numbers[i]] = i;
60
60
}else {
61
61
// found the second one
You can’t perform that action at this time.
0 commit comments