## Check if an array can be Arranged in Left or Right Positioned Array

Given an array arr[] of size n>4, the task is to check whether the given array can be arranged in the form of Left or… Read More »

- Print all permutations of a string in Java
- Minimize the number of replacements to get a string with same number of 'a', 'b' and 'c' in it
- Check if two arrays are permutations of each other using Mathematical Operation
- Check if two Linked Lists are permutations of each other
- Arrange first N natural numbers such that absolute difference between all adjacent elements > 1
- Number of moves required to guess a permutation.
- Number of unique permutations starting with 1 of a Binary String
- Minimum length of string having all permutation of given string.
- Permutations to arrange N persons around a circular table
- Check if any permutation of N equals any power of K
- Permutation of an array that has smaller values from another array
- Lexicographically smallest permutation with no digits at Original Index
- Arrangement of the characters of a word such that all vowels are at odd places
- Lexicographically Smallest Permutation of length N such that for exactly K indices, a[i] > a[i] + 1
- Find the number of good permutations
- Find a permutation of 2N numbers such that the result of given expression is exactly 2K
- Find a permutation such that number of indices for which gcd(p[i], i) > 1 is exactly K
- Find permutation of n which is divisible by 3 but not divisible by 6
- Find the good permutation of first N natural numbers

Given an array arr[] of size n>4, the task is to check whether the given array can be arranged in the form of Left or… Read More »

Given an array of digits of length n > 1, digits lies within range 0 to 9. We perform sequence of below three operations until… Read More »

I recently go interviewed for MakeMyTrip Developer position. I had 5 rounds: Round 1: 1) Reverse a Linked List – You should be able to… Read More »

Heap’s algorithm is used to generate all permutations of n objects. The idea is to generate each permutation from the previous permutation by choosing a… Read More »

BogoSort also known as permutation sort, stupid sort, slow sort, shotgun sort or monkey sort is a particularly ineffective algorithm based on generate and test… Read More »

Given a word, find lexicographically smaller permutation of it. For example, lexicographically smaller permutation of “4321” is “4312” and next smaller permutation of “4312” is… Read More »

A permutation, also called an “arrangement number” or “order”, is a rearrangement of the elements of an ordered list S into a one-to-one correspondence with… Read More »

Python provide direct methods to find permutations and combinations of a sequence. These methods are present in itertools package. Permutation First import itertools package to… Read More »

Given a string, we need to print all possible palindromes that can be generated using letters of that string. Examples: Input: str = “aabcb” Output:… Read More »

Permutation refers to the process of arranging all the members of a given set to form a sequence. The number of permutations on a set… Read More »

Permutation is an arrangement of objects in a specific order. Order of arrangement of object is very important. The number of permutations on a set… Read More »

Given a linear equation of n variables, find number of non-negative integer solutions of it. For example,let the given equation be “x + 2y =… Read More »

Given an n x n grid, count squares in it. Examples : Input: n = 2 Output: 5 (4 squares of 1 unit + 1… Read More »

Given a string that may contain duplicates, write a function to print all permutations of given string such that no permutation is repeated in output.… Read More »