Update ncr_modulo_p.cpp

This commit is contained in:
Kaustubh Damania
2020-11-14 11:24:01 +05:30
committed by GitHub
parent ba954d4446
commit 2ad2f7216d

View File

@@ -28,8 +28,8 @@ namespace ncr_modulo_p {
*/
class NCRModuloP {
private:
std::vector<uint64_t> fac{};
uint64_t p = 0;
std::vector<uint64_t> fac{}; // stores precomputed factorial(i) % p value
uint64_t p = 0; // the p from (nCr % p)
public:
/** Constructor which precomputes the values of n! % mod from n=0 to size