Problem Can anybody help me on how to figure out the dp behind this problem. I have already written a recursive solution for this problem. Also can anybody help me how to see after writing the recursive code that what are the states of the dp.I got too much difficulty in determining the states of a dp solution.