Problem in understanding VIPUL AND MODULOS

sir i just didn’t understand how did we avoid overcounting same numbers like 223 i have watched the video 3-4 times but i,m unable to understand how taking 1st digit first resolves the issue please reply ASAP

Please watch the code implementation video of this question. You’ll easily get to know how we maintain that thing.
Please have a look

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.