Basic questions to get a feel of DP.
Dp solution requires us to solve the sub problem on every prefix of the array. A prefix of the array is a subarray from 0 to i for some i.
This is a companion discussion topic for the original entry at https://algo.monster/problems/dp-list