Given an integer N, the task is to find the number of distinct bracket sequences that can be formed using 2 * N brackets such… Read More

# Tag Archives: Permutation and Combination

Given the numeric string str, where 1 represents ‘a’, 2 represents ‘b’, …, 26 represents ‘z’, the task is to print all possible alphabetical strings… Read More

Given two integers N and X, the task is to find the count of all possible N digit numbers whose every single digit is a… Read More

Given an integer N, the task is to find the total number of right angled triangles that can be formed such that the length of… Read More

Given an array arr[] of N integers and an integer K, the task is to check if the expression formed for any permutation of the… Read More

Given 3 integers R, G, and B denoting the count of 3 colors Red, Green, and Blue respectively such that two different colors of the… Read More

Given an array of strings str[] of length N, consisting of strings of the same length, the task is to find the string which only… Read More

Given an array arr[] of N positive integers. The task is to find the number of trees possible having N vertices such that the distance… Read More

Given a large number N in the form of a string, the task is to determine the count of distinct numbers that can be formed… Read More

Given an integer, N, the task is to count the number of ways to generate an array, arr[] of consisting of N integers such that… 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 range [low, high], both inclusive, and an integer K, the task is to select K numbers from the range(a number can be chosen… 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