I have the following programm calculating the binomial coefficient of two integers. But I want to change the programm, that it calculates and saves only the necessary coeffi
What about this Code from this site
private static long binomial(int n, int k) { if (k>n-k) k=n-k; long b=1; for (int i=1, m=n; i<=k; i++, m--) b=b*m/i; return b; }