# Tag Archives: binomial coefficient

Prerequisite – PnC and Binomial Coefficients  So far every problem discussed in previous articles has had sets of distinct elements, but sometimes problems may involve… Read More
Prerequisite – Combinatorics Basics  Several Counting problems require finding the number of ways to arrange a certain number of distinct elements, where the relative order… Read More
Given three numbers n, r and p, compute the value of nCr mod p. Here p is a prime number greater than n. Here nCr… Read More
Given an array arr[] of N integer elements, the task is to find the sum of the average of all subsets of this array. Example:  … Read More
Given three numbers n, r and p, compute value of nCr mod p. Example:  Input: n = 10, r = 2, p = 13 Output: 6… Read More
Pascal’s triangle is a triangular array of binomial coefficients. Write a function that takes an integer value n as input and prints first n lines… Read More
Here the function takes two parameters n and k and returns the value of Binomial Coefficient C(n, k).  Example:  Input: n = 4 and k… Read More
The following are the common definitions of Binomial Coefficients.  A binomial coefficient C(n, k) can be defined as the coefficient of x^k in the expansion… Read More