Tilling Problem - II

output is going wrong. check out this code
ide: https://ide.codingblocks.com/s/193104

@Vishal123 Recursive function for this problem should be something like this:
int noofways(int n,int m)
{
if(n==0)
return 1;
if(n<0)
return 0;

int way1=noofways(n-1,m);
int way2=noofways(n-m,m);
return (way1+way2)%1000000007;
}

However just by recursion, your code will not pass all the test cases and will give Time Limit Exceed error since the constraints are large. You need dynamic programming to solve this problem. So i would suggest you to attempt this problem after completing Dynamic Programming concepts.