Stuck with this dp problem in Spoj : http://www.spoj.com/problems/GNYR09F/

Revision en1, by akashcserocks, 2017-03-11 20:53:19

Here is the ideone link to my code : http://ideone.com/TdjqlG

What I'm doing is that I'm passing the last bit visited as a parameter and based on whether the bit is 0 or 1 ,doing 2 separate sets of recursive calls. I'm assuming that instead of n element array, the array is of n+1 elements and the (n+1)the element is always 0. Please help!

Tags dp, spoj, practice, spoj gnyr09f

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English akashcserocks 2017-03-11 20:53:19 418 Initial revision (published)