Dynamic Programming Algorithm
<p>I have the following question on a homework
<a href="https://i.stack.imgur.com/8yb10.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8yb10.png" alt="enter image description here"></a></p>

<p>I have no idea how to solve part B (at least with a dynamic programming algorithm) because from what I can tell, the best cost for N days has nothing to do with the best cost for N-1 days.  I'm not looking for someone to do my homework for me (I know that's frowned upon here), but just for some guidance on where to start, or what subproblems to split this up into.  Thanks!</p>