Interesting DP problem:
The formula is supposed to be DP[i][d] = # of arithmetic subsequences slices ending at index i with difference d
Can someone explain how to come up with this and also how to come up with a recurrence relation?
Thanks
Find arithmetic subsequence slices
Interesting DP problem:
The formula is supposed to be DP[i][d] = # of arithmetic subsequences slices ending at index i with difference d
Can someone explain how to come up with this and also how to come up with a recurrence relation?
Thanks
Rev. | Lang. | By | When | Δ | Comment | |
---|---|---|---|---|---|---|
en1 | aakarshmadhavan | 2018-07-16 20:39:04 | 365 | Initial revision (published) |