2-d array is giving segmentation fault for big values.
Giving Segmentation fault for higher values
hello @mb129162
there is no need of 2d array because m is always constant.
recurrence relation for this problem will be
dp[i]=dp[i-1]+ dp[i-m] // when placed 1 tile vertically + when placed m tiles horizontally
By mistake, i took 2-d array. it will be 1-d array . Now it got accepted 
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.