I was trying to solve this problem of dynamic programming using memoization:
I wrote down the plain recursive solution to this question, and then I tried to do it using recursion.
But the code I tried to write using memoization is not working.
This is the link to the code.
Please help me find out why my code is not working correctly