Vipul and Modulos Code

What are we trying to do by (m*10+(s[i]-‘0’))%MOD ? (In the coding part)

Please go through the tutorial video for the question. Its easy to understand.
Just maintaining the modulus.

The way similar to how you form a number from a string. You keep on multiplying with 10.
%MOD ensures we don’t go beyond the limit.

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.

Hi,

m is the number formed in different permutations possible.

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.