## Print all the permutation of length L using the elements of an array | Iterative

Given an array of unique elements, we have to find all the permutation of length L using the elements of the array. Repetition of elements… Read More »

- Print all the permutation of length L using the elements of an array | Iterative
- 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
- Count number of binary strings such that there is no substring of length greater than or equal to 3 with all 1's
- Count permutation such that sequence is non decreasing
- Number of words that can be made using exactly P consonants and Q vowels from the given string
- 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
- Number of triangles that can be formed

Given an array of unique elements, we have to find all the permutation of length L using the elements of the array. Repetition of elements… Read More »

Given a string str, the task is to generate all the distinct permutations of the given string iteratively. Examples: Input: str = “bba” Output: abb… Read More »

Given a string s of size N. The task is to find the largest substring which consists of same characters Examples: Input : s =… Read More »

Given four integers X, Y, M and N. The task is to find the number of ways to form a word by choosing X number… Read More »

Given three integers N, X and Y. The task is to find the number of ways to arrange 2*N persons along two sides of a… Read More »

Given a tree with N nodes and N-1 edges with root at 1 and given an array of N-1 integers. The task is to assign… Read More »

Given a number N. The task is to find the number of ways you can draw N chords in a circle with 2*N points such… Read More »

Given three integers N, M, X. The task is to find the probability of distributing M items among X bags such that first bag contains… Read More »

Given two integers N and M, the task is to find the count of possible sequences a1, a2, … of length N such that the… Read More »

Given two integers N and K, the task is to find the count of quadruples of (i, j, k, l) such that 1 ≤ i… Read More »

Given four integers X, Y, M and W. The task is to find the number of ways to choose X men and Y women from… Read More »

Given the mobile numeric keypad. You can only press buttons that are up, left, right or down to the current button or can choose to… Read More »

Given an integer N, the task is to partition the first N natural numbers in two non-empty sets such that the sum of these set… Read More »

Given an array p[] of odd length N where p[i] denotes the probability of getting a head on the ith coin. As the coins are… Read More »

Given an array arr[] of size N, the task is to generate and print all permutations of the given array. Examples: Input: arr[] = {1,… Read More »