this is my soln which has the same approach as shown in the video , could you tell me why is it giving me tle ?
Getting tle on test case 19
@debyian
Your approach is fine. But you’re not memoising the solutions. You need to save calculated solutions to avoid calculating overlapping subproblems.