Given an integer N, the task is to count the number of even and odd binomial coefficients up to Nth power. Examples: Input: N =… Read More

# Tag Archives: binomial coefficient

Given two integers M and X, the task is to find the number of sequences of length M that can be generated comprising of X… Read More

Given an array, arr[] of size N consisting of elements from the range [1, N], that represents the order, in which the elements are inserted… Read More

Given an integer N, the task is to find the number of distinct bracket sequences that can be formed using 2 * N brackets such… Read More

Given three integers N, M and K, the task is to calculate the sum of products of Binomial Coefficients C(N, i) and C(M, K –… Read More

Given an integer N, the task is to find the Central binomial coefficient. The first few Central binomial coefficients for N = 0, 1, 2,… Read More

Given N blocks out of which K are colored. These K colored blocks are denoted by an array arr[]. The task is to count the… Read More

Given a string str and two integers P and Q. The task is to find the total count of words that can be formed by… Read More

Given a string str and Q queries. Each query consists of an integer K. The task is to find the number of ways of choosing… Read More

Given the NxN grid of horizontal and vertical roads. The task is to find out the number of ways that the person can go from… Read More

Given a complete graph with N vertices, the task is to count the number of ways to remove edges such that the resulting graph has… Read More

A useful application of Pascal’s triangle is the calculation of combinations. The formula to find nCr is n! / r! * (n – r)! which… Read More

Given two positive integers n and k, the task is to count the number of special permutations. A special permutation P is defined as a… Read More

Given four integers n, w, m and k where, m is the total number of men. w is the total number of women. n is… Read More