Error in my code
your recurrence is not correct and base case is also not complete, refer below
int f(n,m){
if(n<m) return 1;
else return (f(n-1,m)+f(n-m,m))%1000000007;
}
hit a like button if it works
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.