Combinatorial - Hard Articles
Given a number N, count the numbers X of length exactly N such that the number X and the sum of digits of the number… Read More
Given an array A[] of integers. Your task is to output the count of triplets such that in each triplet, there can be at most… Read More
Given N, the task is to determine the count of all permutations of size 2N having at least N-increasing elements. An element pi of a… Read More
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 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 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 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 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 an array nums[ ] and an integer target. Find whether there exists a combination of integers in nums[ ] such that their sum is… Read More
Given N and M number of points on the straight line, denoting the positions of the customers and vendors respectively. Each vendor provides service to… Read More
Given an array arr[] and an integer N, the task is to find the maximum number of pairs that can be formed such that ith… Read More
Given K permutations of numbers from 1 to N in a 2D array arr[][]. The task is to find the longest common subsequence of these… Read More
Given an integer N in the range [0, 109], the task is to find the maximum product of two integers that are formed by dividing… Read More
Given two arrays arr1[] and arr2[] with distinct elements of size N.The task is to count the total number of possible combinations after swapping elements… Read More
Given two integers N and K, the task is to find the count of binary strings of at most N length that can be formed… Read More