In modular properties sir told that
(a-b)%m=((a%m)-(b%m)+m)%m
But in this question , sir written
(b-a)%N=0
=> b%N=a%N
In modular properties sir told that
(a-b)%m=((a%m)-(b%m)+m)%m
But in this question , sir written
(b-a)%N=0
=> b%N=a%N
hello @asif_h both the operations evaluate the same result .
if you try to solve this with any example you will also find the satisfactory answer .
first approach that you mentioned is generally implemented when the test cases are larger.
with practice you will learn that there is no major difference between the both .
if you feel that your doubt is cleared please mark this doubt as resolved .
Happy Learning !!
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.