## Find a permutation such that number of indices for which gcd(p[i], i) > 1 is exactly K

Given two integers N and K, the task is to find a permutation of integers from the range [1, N] such that the number of… 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
- Arrange first N natural numbers such that absolute difference between all adjacent elements > 1
- Number of moves required to guess a permutation.
- Check if two Linked Lists are permutations of each other
- Number of unique permutations starting with 1 of a Binary String
- Minimum length of string having all permutation of given string.
- Check if any permutation of N equals any power of K
- Permutations to arrange N persons around a circular table
- Permutation of an array that has smaller values from another array
- Arrangement of the characters of a word such that all vowels are at odd places
- Lexicographically smallest permutation with no digits at Original Index
- Lexicographically Smallest Permutation of length N such that for exactly K indices, a[i] > a[i] + 1
- Find permutation of n which is divisible by 3 but not divisible by 6
- 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

Given two integers N and K, the task is to find a permutation of integers from the range [1, N] such that the number of… Read More »

Given two integers N and K, the task is to find a permutation of first 2*N natural numbers such that the following equation is satisfied.… Read More »

Given an integer N. The task is to find the permutation of first N natural numbers such that the absolute difference between any two consecutive… Read More »

Given a string str, the task is to print all the permutations of str. A permutation is an arrangement of all or part of a… Read More »

Given a string consisting of only three possible characters ‘a’, ‘b’ or ‘c’. The task is to replace characters of the given string with ‘a’,… Read More »

Given an integer N and there is a hidden permutation (of numbers from 1 to N, each occurring exactly once) that you need to guess.… Read More »

Given two integers N and K, the task is to generate a permutation of N numbers (Every number from 1 to N occurs exactly once)… Read More »

Given an integer N. The task is to find the lexicographically smallest permutation of integer of the form: 12345…N such that no digit occurs at… Read More »

Given a string ‘S’ containing vowels and consonants of lowercase English alphabets. The task is to find the number of ways in which the characters… Read More »

Given an integer . The task is to find another interger which is permutation of n, divisible by 3 but not divisible by 6. Given… Read More »

Given a positive integer N and K where and . The task is to check whether any permutation of digits of N equals any power… Read More »

Given two arrays A and B of equal size. The task is to print any permutation of array A such that the number of indices… Read More »

Given two singly Linked list of integer data. The task is to write a program that efficiently checks if two linked lists are permutations of… Read More »

Given a binary string composed of 0’s and 1’s. The task is to find the number of unique permutation of the string which starts with… Read More »

Given two unsorted arrays of same size where arr[i] >= 0 for all i, the task is to check if two arrays are permutations of… Read More »