Compositorial of a number
Given a natural number N, the task is to find the Nth compositorial number....
read more
Total number Of valid Home delivery arrangements
Given the number of orders, find the number of valid arrangements of orders where delivery of ith order is always after the pickup of ith order....
read more
Recursive Program to find Factorial of a large number
Given a large number N, the task is to find the factorial of N using recursion....
read more
Factorial of a number without using multiplication
Given a positive number N, the task is to calculate the factorial of N without using the multiplication operator....
read more
Sum of largest divisible powers of p (a prime number) in a range
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 numbers from L to R.Examples:...
read more
Minimum length of string having all permutation of given string.
Given a string where . Assume that all the characters in are unique. The task is to compute the minimum length of a string which consists of all the permutations of the given string in any order....
read more
Find maximum power of a number that divides a factorial
Given two numbers, fact and n, find the largest power of n that divides fact! (Factorial of fact)....
read more
Count numbers having N 0’s and M 1’s with no leading zeros
Given two integer N and M, the task is to find the number of distinct numbers having N 0’s and M 1’s with no leading zeros and N + M total digits....
read more
Largest power of k in n! (factorial) where k may not be prime
Given two numbers k and n, find the largest power of k that divides n!  Constraints:  K > 1...
read more
Count permutation such that sequence is non decreasing
Given an array arr[] of integers, the task is to find the count of permutation of the array such that the permutation is in increasing order i.e. arr[0] ? arr[1] ? arr[2] ? … ? arr[n – 1].Examples:...
read more
Count prime factors of N!
Given an integer N, the task is to count the number of prime factors of N!....
read more
Evaluate the expression ( N1 * (N – 1)2 * … * 1N) % (109 + 7)
Given an integer N, the task is to find the value of the expression ( N1 * (N – 1)2 * … * 1N) % (109 + 7)....
read more