anyone figure out what i am going wrong.
following logic implemented
ans = n!*inverse(r!)*inverse(n-r!)
Virat and ncr problem
Logic is fine. There is some error in the implementation. Your code is generating weird answer for sample input.
Please have a look at this short code to refer.
Awesome! @rajujnvgupta
You may close the thread if the doubt has been resolved. Please give a rating
1 Like