mCr = m*(m-1)/2 kese?

yeh samaj nhi aaya ??
mera permutation and combination weak h toh kya yeh sahi h
mCr = m*(m-1)/2 kese ??

hello @anujsharmabadboy
see if we are getting same modulo in prefix sum i,e

…a . . . … … . . a

then that means sum of elements between those two same modulo is divisible by n.
becuase then only
(a+something) %n = a%n
implies something%n=0

so let say we have
…a … a…a…a…
now here if i pick any two a then sum in between them will always be divisible by n.

so if m is the frequency of a in prefix mod sum array then m*(m-1)/2 such subarray will be there.

mc2=> m! / [ (m-2)! * 2! ]

m!= m*(m-1) * (m-2)! // using this in above equation

mc2=> m * (m-1) * (m-2)! / [ (m-2)! * 2! ]
cancel (m-2)! from numerator and denominator

mc2=> m*(m-1)/ 2

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.