Thanks Dave,
but i want some more efficient in my case, something like O(k) to calculate
all mC1 mC2...mCk,
i already had a worst time O(k^2),
i.e
for (long long int i1=1;i1<=k;i1++)
{
while((result*(m-i1+1))%i1)
 {
 result=result+1000000007;
}
result=(result*( m-i1+1));
result /= i1;
result=result%1000000007;
m1[i1]=result;//mCi
}
this works well upto calculating 10^7 C 10^5,
but i want some more efficient...
does your is O(k)??,doesnt seems so,please suggest if you get any better
Really thanks for the effort..

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to