# Category Archives: Combinatorial

Given a string S, the task is to count the distinct permutations of every possible length of the given string. Note: Repetition of characters is… Read More
Given an integer N, the task is to calculate the total number of distinct permutations of length N, consisting only of letters ‘a’, ‘b’, and… Read More
Given a number N, the task is to find the number of ways in which the integer N can be represented as a sum of… Read More
Given an integer N, the task is to find the number of Binary Strings of length N such that frequency of 1‘s is greater than… 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 two integers N and M, where N denotes the count of ‘0’ and M denotes the count of ‘1’, and an integer K, the… Read More
Given two integers N and M, the task is to construct a binary string with the following conditions :  The Binary String consists of N… Read More
Given a left, right, and a spur track as shown in the below figure. There are N trucks from value 1 to N arranged in… Read More
Given two strings str1 and str2, the task is to check if any permutation of the given strings str1 and str2 is possible such that… Read More
Given a string S and an integer K, the task is to find the total number of strings that can be formed by inserting exactly… Read More
Place the numbers 1 to 9 in a circle, so that wherever there are three in a straight line they shall add up to 15.… Read More
Given an integer N, the task is to find the number of possible binary strings of length N with an equal frequency of 0‘s and… Read More
Given a value X, the task is to find a minimum size binary string, such that if any 2 characters are deleted at random, the… Read More
Given a number N and two arrays arr1[] and arr2[] of length 4. The array arr1[] denotes the denomination of 1, 5, 10, and 20… Read More
Problem Description On a busy road, multiple cars are passing by. A simulation is run to see what happens if brakes fail for all cars… Read More