Given integers n, r, and a prime number p, compute nPr % p and nCr % p. Use factorial precomputation and Fermat's Little Theorem to find modular inverses for division.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.