my sample test case is passing but my code gives wrong answers for the other test cases. please tell me where is the flaw.
here’s the code:- https://ide.codingblocks.com/s/83331
Tiling problem n*m
Use the condition count[0]= count[1]=1;
Start the loop from i=2, to n,
and use the condition
if(i>=m)
{
count[i]=(count[i-1]+count[i-m])%1000000007;
}
else
{
count[i]=count[i-1];
}