Skip to content

Tag Archives: binomial coefficient

Given an array arr[] consisting of N integers, the task is to find the remaining array element after subtracting each element from its next adjacent… Read More
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
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, 3… are  … Read More
Given are N natural numbers, the task is to find the count of the subarrays of size N that can be formed using elements from… 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