Re: [algogeeks] AllBinomialCoefficients

2012-03-04 Thread pankajsingh
@Dave- really nice , that will do,thnks a lot! -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegro

Re: [algogeeks] AllBinomialCoefficients

2012-03-04 Thread prakash y
Hope this will work perfectly; if(r > n-r) r = n - r; int result = n; for(int i=2; i<=r; i++) { n--; result *= n; result /= i; result %= p; } print result; On Sat, Mar 3, 2012 at 9:42 PM, pankajsingh wrote: > @amrit- thnks!! > > -- > You received this message because you are subscribed to the G