javamathcombinatorics

Combinatoric 'N choose R' in java math?


Is there a built in method in a java library that can compute 'N choose R' for any N, R?


Solution

  • The apache-commons "Math" supports this in CombinatoricsUtils#binomialCoefficient(int, int)