Combinatorics, DSA, PracticeHow to solve nCr%p using Fermat’s Little Theorem?Given three numbers n, r and p, compute the value of nCr%p. Here p is a prime number greater than n, and nCr is the Binomial Coefficient.Ateev DuggalAugust 13, 2022
Combinatorics, DSA, PracticeHow to Solve nCr%p using Dynamic ProgrammingWe are given three integers n, r, and p, we have to find the value of nCr%p. Here p is a natural number greater than n and nCr is the Binomial Coefficient.Ateev DuggalAugust 5, 2022