Can someone help me find mistake in my code?

Revision en1, by VandanRogheliya, 2020-05-21 10:05:05

While solving this question I came up with this solution. I was getting WA. I checked my code 5 times, I was not able to find a mistake. Then Finally I checked the editorial, it was the same dp but in an iterative form. Can someone point out the mistake?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English VandanRogheliya 2020-05-21 10:05:05 413 Initial revision (published)