Skip to content

Commit 82b5c06

Browse files
authored
Update 446.Arithmetic-Slices-II-Subsequence.cpp
1 parent 6564dd2 commit 82b5c06

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Hash/446.Arithmetic-Slices-II-Subsequence/446.Arithmetic-Slices-II-Subsequence.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ class Solution {
33
int numberOfArithmeticSlices(vector<int>& A)
44
{
55
int n = A.size();
6-
vector<unordered_map<long,int>>dp(n);
6+
unordered_map<long,int>dp[1000];
77
int count = 0;
88

99
for (int i=1; i<A.size(); i++)
@@ -19,8 +19,7 @@ class Solution {
1919
dp[i][diff] = 1;
2020
}
2121
}
22-
23-
22+
2423
return count;
2524
}
2625
};

0 commit comments

Comments
 (0)