I've been trying to do this question since many hours and am unable to visualize the authors solution. The question involves maintaining a 1d dp from a 2d dp.
I'm unable to understand what does dp[j] represent in the authors solution after ignoring (i) from dp states ?