File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments