I was trying to solve this question:
I was trying to write a simple recursive solution to this question (not memoization or dynammic programming, plain recursion), the code is here:
My code is always giving 1 as the output.
I request the TA to kindly edit my code so that it can give the desired output.