nCr function

BigInt nCr(
  1. int n,
  2. int r
)

Calculates the number of combinations of r items taken from n.

Implementation

BigInt nCr(int n, int r) => nPr(n, r) ~/ factorial(r);