Help with dp problem — Chocolate Bar

Revision en1, by Mr.Awesome, 2017-01-11 18:20:05

I was checking some solution of this problem, and I didn't understand 2 things, let's look at this solution , first why we loop over k j(0..k), and second why k replaced by j and k-j in each call?

Tags dp

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Mr.Awesome 2017-01-11 18:20:05 336 Initial revision (published)