We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 236ce36 commit 4efc5b2Copy full SHA for 4efc5b2
cpp/_1.cpp
@@ -18,9 +18,9 @@ class Solution {
18
vector<int> twoSum(vector<int>& nums, int target) {
19
unordered_map<int, int> m;
20
vector<int> result;
21
- for(int i=0; i<nums.size(); i++){
+ for(int i = 0; i < nums.size(); i++){
22
// not found the second one
23
- if (m.find(nums[i])==m.end() ) {
+ if (m.find(nums[i]) == m.end() ) {
24
// store the first one poisition into the second one's key
25
m[target - nums[i]] = i;
26
}else {
0 commit comments