Doubt in robot path problem

why there sir write dp[][]%MOD

since the constraints are large so the no of ways the robot can reach a particular cell is large hence adding up to big numbers can lead to integer overflow
so we take dp[i][j]%MOD so that we can prevent integer overflow

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.