## Program to calculate value of nCr

Following are common definition of Binomial Coefficients. A binomial coefficient C(n, k) can be defined as the coefficient of X^k in the expansion of (1… Read More »

- Program to calculate the value of nPr
- Number of ways to go from one point to another in a grid
- Check if factorial of N is divisible by the sum of squares of first N natural numbers
- Number of trailing zeroes in base B representation of N!
- Find GCD of factorial of elements of given array
- Number of ways to arrange K different objects taking N objects at a time
- Check whether factorial of N is divisible by sum of first N natural numbers
- Count of N digit numbers possible which satisfy the given conditions
- Count numbers having N 0's and and M 1's with no leading zeros
- Factorial of an Array of integers
- Find the smallest number X such that X! contains at least Y trailing zeros.
- Find sum of factorials in an array
- Find the count of M character words which have at least one character repeated
- Check if a given number divides the sum of the factorials of its digits
- Count different numbers possible using all the digits their frequency times
- Calculate MDAS Factorial of given number
- Euler zigzag numbers ( Alternating Permutation )

Following are common definition of Binomial Coefficients. A binomial coefficient C(n, k) can be defined as the coefficient of X^k in the expansion of (1… Read More »

Given a number n, find the number of ways to multiply n elements with an associative operation. Examples : Input : 2 Output : 2… Read More »

Given a number n, generate a list of n composite numbers. Examples: Input : 5 Output : 122, 123, 124, 125 Input : 10 Output… Read More »

Given a positive integer n, find the first digit in its factorial. Examples : Input : n = 5 Output : 1 Factorial of 5… Read More »

Given two numbers N and M. Find the number of ways in which factorial N can be expressed as a sum of two or more… Read More »

Given an integer n, find the power of a given prime number(r) in n! Examples : Input : n = 6 r = 3 Factorial… Read More »

Given a range [L, R], and a prime number P. We are required to find the sum of the highest power of P in all… Read More »

Given a string, count how many maximum-length palindromes are present.(It need not be a substring) Examples: Input : str = “ababa” Output: 2 Explanation :… Read More »

Given a string s that may have duplicate characters. Find out the lexicographic rank of s. s may consist lower as well as upper case… Read More »

Given two numbers, fact and n, find the largest power of n that divides fact! (Factorial of fact). Examples: Input : fact = 5, n… Read More »

Given two integer N or M find the number of zero’s trailing in product of factorials (N!*M!)? Examples: Input : N = 4, M =… Read More »

Given the upper limit limit, print factorials of all Fibonacci Numbers smaller than limit. Examples : Input : limit = 20 Output : 1 1… Read More »

This is a mathematical series program where a user must enter the number of terms up to which the sum of the series is to… Read More »

Given an integer n, we need to find the number of positive integers whose factorial ends with n zeros. Examples: Input : n = 1… Read More »

Given two number m and n, the task is to find factorial of all number including m and n and then print below format. Examples:… Read More »