## Number of subsets with sum divisible by M | Set 2

Given an array arr[] of N integers and an integer M, the task is to find the number of non-empty subsequences such that the sum… Read More »

- Iterative approach to print all permutations of an Array
- Largest substring with same Characters
- Mobile Numeric Keypad Problem | Set 2
- Iterative approach to print all combinations of an Array
- Sum of the distances from every node to all other nodes is maximum
- Probability of getting more heads than tails when N biased coins are tossed
- Print all the permutation of length L using the elements of an array | Iterative
- Number of ways to reach the end of matrix with non-zero AND value
- Iterative program to generate distinct Permutations of a String
- Count ways to divide circle using N non-intersecting chord | Set-2
- Probability of distributing M items among X bags such that first bag contains N items
- Number of N length sequences whose product is M
- Number of ways to paint a tree of N nodes with K distinct colors with given conditions
- Number of Subsequences with Even and Odd Sum | Set 2
- Count the number of subsequences of length k having equal LCM and HCF
- Find a pair (n,r) in an integer array such that value of nCr is maximum
- Find the number of words of X vowels and Y consonants that can be formed from M vowels and N consonants
- Total ways of choosing X men and Y women from a total of M men and W women
- Count number of binary strings such that there is no substring of length greater than or equal to 3 with all 1's
- Number of Quadruples with GCD equal to K
- Count permutation such that sequence is non decreasing
- Number of ways to arrange a word such that no vowels occur together
- Number of ways to arrange 2*N persons on the two sides of a table with X and Y persons on opposite sides
- Number of words that can be made using exactly P consonants and Q vowels from the given string
- Partition first N natural number into two sets such that their sum is not coprime
- Find if nCr is divisible by the given prime
- Ways to choose balls such that at least one ball is chosen
- Number of K length subsequences with minimum sum
- Count of distinct graphs that can be formed with N vertices
- Total ways of selecting a group of X men from N men with or without including a particular man

Given an array arr[] of N integers and an integer M, the task is to find the number of non-empty subsequences such that the sum… Read More »

Fuss–Catalan Numbers are a generalization of Catalan numbers that uses triplets instead of pairs. The Fuss-Catalan Numbers can be represented by a Series with the… Read More »

Given an array arr[] of length N and an integer X, the task is to find the number of subsets with sum equal to X.… Read More »

Given an array arr[] of length N, the task is to find the overall sum of subsets of all the subsets of the array. Examples:… Read More »

Given an array arr[] of N positive integers. The task is to find the count of pairs (arr[i], arr[j]) such that the maximum power of… Read More »

A string is called good if it is made with only digits 0 to 9 and adjacent elements are different. The task is to find… Read More »

Given that N people are sitting in a circular queue numbered from 1 to N, the task is to count the number of ways to… Read More »

Given an integer N, the task is to find all of its divisors using its prime factorization. Examples: Input: N = 6 Output: 1 2… Read More »

Given an array arr[] of size N and an integer K, the task is to find the number of K length subsequences of this array… Read More »

Given a square with N points on each side of the square and none of these points co-incide with the corners of the square. The… Read More »

Given a string str and two integers P and Q. The task is to find the total count of words that can be formed by… Read More »

Given an array of non-negative integers arr[]. The task is to find a pair (n, r) such that value of nCr is maximum possible r… Read More »

Given an integer N, the task is to count the number of binary strings possible of length N such that they don’t contain “111” as… Read More »

Given two integers X and N. The task is to find the total number of ways of selecting X men from a group of N… Read More »

Given an array Arr and an integer K. The task is to find the number of subsequences of size K such that the LCM and… Read More »