# Category Archives: Combinatorial

Given integer N, the task is to count the number of ways( modulo 109 + 7) to create an N digit number from digits 1… Read More
Given the number N, the task for this problem is to find the number of ways of creating an N digit number whose bitwise XOR… Read More
Given a number N, the task is to count the number of ways to create a string of size N (only with capital alphabets) such… Read More
Given an array arr[] of size N  non-negative integers, the task is to find the total number of permutations of arr[] such that each element… Read More
Given a number N, the task is to count the number of ways to create an N digit number from digits 1 to 9 such… Read More
Given integers A, B, C, and D, There are two boxes First Box has A red balls and B blue balls and the second box… Read More
Given integers A and K, there are A boxes the first box contains K balls, the Second box contains K + 1 balls, the Third… Read More
Given integers X and Y representing X girls and Y boys, the task is to count the number of ways arranging X girls and Y… Read More
Given a number N and string S, count the number of ways to create a binary string (containing only ‘0’ and ‘1’) of size N… Read More
For N given cities, find how many ways a driver can traverse through them so that each town is visited exactly K times. From each… Read More
Given an array arr[] of N integers, the task is to find count of triplets having a product less than 0. Examples: Input: arr[] =… Read More
Given an array of pairs arr[] of size N (N ≥ 3) where each element of pair is at most N and each pair is… Read More
Given an array A[] of N  integers, the task is to calculate the total number of pairs of indices (i, j) satisfying the following conditions… Read More
Given an array arr[] of integers of size N that might contain duplicates, the task is to find all possible unique subsets, using C++ STL.… Read More
Given two integers N and X, the task is to convert 1 to N using minimum operations of any of the following operations: Change a… Read More