Hi!
I was trying the at coder dp contest and I wrote a recursive dp solution for problem a . It works fine for 7 test cases but fails for last 4.
The point that is disturbing is that similar logic but iterative code of dp is getting accepted of other people.
Can someone please help me with this or point out my mistake if I am doing a foolish one.
This is my code
This is the iterative code that works