I know how to find Binomial coefficient usign dynamic programming , but in this case I have to store many others binomial coefficients. Could somebody provide me code how to calculate Binomial coefficient using factorization? I know that I have to factorize n! , k! and (n-k)! and the try to reduce it but I don't know how to compute it efficiently
Here's a java code that I've written that does this. However I don't really understand the algorithm, I just implemented the pseudo-code that I found in the original source (Computing Binomial Coefficients, P. Goetgheluck). You can look it up if you are interested in how it works.
http://pastebin.com/ev1g3hb7