446. Arithmetic Slices II - Subsequence
446. Arithmetic Slices II - Subsequence
Description
Solution
DP to check out the previous subsequence number satisfied requirement.
1 | dp[i][d] = In position i, the number satisfied requirement that difference is d |
Code
1 | typedef long long LL; |
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.