Code not working

Hello @akshitmehta,

This question would not pass the test cases and face TLE.
Solution:
Solve this question after studying Dynamic Programming as this is requires memoization.

Hope, this would help.