for 3c2 you computed using formula as
(n*(n-1))/2 why? is it the general formula for NcR
CPP - Divisble Subarrays, Pigeonhole Problem
Its not the general formula for C(n,r)
For 2 only, it is same as n*(n-1)/2 hence used. Recommended you use the mathematical formula where ever required
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.