Skip to content

Tag Archives: permutation

Given three integers N, P and K, the task is to find the number of ways of painting K cells of 3 x N grid… Read More
Given a string S, the task is to find the permutation of the string such that palindromic substrings in the string are maximum.Note: There can… Read More
Given a string S of lowercase English alphabets, the task is to check if there exists an arrangement of string S such that it doesn’t… Read More
Given an array A[] consisting of decreasing permutation of N numbers, the task is to sort the array using triple swaps. If it is not… Read More
Given two integers N and K, find the Kth permutation sequence of numbers from 1 to N without using STL function.Note: Assume that the inputs… Read More
Given string str with unique characters and a number N, the task is to find the N-th lexicographic permutation of the string using Factoradic method. Examples:… Read More
Given an integer N, the task is to find the number of permutations of first N positive integers such that prime numbers are at prime… Read More
Given an array arr containing N elements, find the length of the longest subsequence such that it is a valid permutation of a particular length.… Read More
Given an array arr of length N, the task is to count the minimum number of operations to convert given sequence into a permutation of… Read More
Given an array arr[] of size N, the task is to find the number of permutations in the array that follows the given condition:   If… Read More
Given an array arr containing N positive integers, the task is to check if the given array can be dissociated into two permutations or not… Read More
Given an array arr of positive integers of size N, the task is to find the minimum cost to make this array a permutation of… Read More
Given an array arr containing N positive integers, the task is to check if the given array arr represents a permutation or not.  A sequence… Read More
Given an array arr containing positive integers, the task is to check if the given array arr is a concatenation of two permutations or not.… Read More
Given an array arr containing N positive integers, the task is to check if the given array arr represents a permutation or not.   A sequence… Read More

Start Your Coding Journey Now!