Combinatorics

How 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…

3 years ago

How to Solve nCr%p using Dynamic Programming

We are given three integers n, r, and p, we have to find the value of nCr%p. Here p is…

3 years ago