Hey please go though the code as I getting wrong answer.
Tiling DP solution giving incorrect answer
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.
Hey I didn’t get any help here, please do tell me whats wrong over here.
@dev_emma
please share ur code so that i can check
follow these steps
a) paste ur code here https://ide.codingblocks.com/
b) press save button
c) share the generated code link here
in line no 29
replace arr[i] = arr[i - 1] + arr[i - m]; with arr[i] = (arr[i - 1]%mod + arr[i - m]%mod)%mod; because of modulo property i,e (a+b)%mod=(a%mod+b%mod)%mod
rest everything is correct.
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.