Skip to content

Commit 4efc5b2

Browse files
refactor 1
1 parent 236ce36 commit 4efc5b2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cpp/_1.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ class Solution {
1818
vector<int> twoSum(vector<int>& nums, int target) {
1919
unordered_map<int, int> m;
2020
vector<int> result;
21-
for(int i=0; i<nums.size(); i++){
21+
for(int i = 0; i < nums.size(); i++){
2222
// not found the second one
23-
if (m.find(nums[i])==m.end() ) {
23+
if (m.find(nums[i]) == m.end() ) {
2424
// store the first one poisition into the second one's key
2525
m[target - nums[i]] = i;
2626
}else {

0 commit comments

Comments
 (0)