please tell where my code is wrong
Here is my code-
Displaying wrong answer in test cases
Your function is wrong, use these line of code and make changes accordingly,
take c as 10^9+7
dp[0]= dp[1]=1;
for(int i=2;i<=n;i++)
{
if(i>=m)
{
dp[i]=(dp[i-1]+dp[i-m])%c;
}
else
{
dp[i]=dp[i-1];
}
}