# Tag Archives: permutation

Given four numbers N, L, R, and S, the task is to find a permutation of first N natural numbers(1-based indexing) having the sum as… Read More
Given two permutations arrays arr[] and brr[] of the first N Natural Numbers from 1 to N, the task is to find the absolute difference… Read More
Given two 2D binary arrays, a[][] and b[][] both of size M*N, the task is to pair each row in the array a[][] with any… Read More
Given two permutation arrays A[] and B[] of the first N Natural Numbers, the task is to find the minimum number of operations required to… Read More
Given an array arr[] consisting of N positive integers and an integer K, the task is to check if the array elements can be rearranged… Read More
Given an array arr[] of N distinct binary strings each having N characters, the task is to find any binary string having N characters such… Read More
Given a positive integer M and an array arr[] of size N and a few integers are missing in the array represented as -1, the… Read More
Given an integer K and an array arr[] having N pairwise distinct integers in the range [1, K], the task is to find the lexicographically… Read More
Given a positive integer N and an array arr[] of size K consisting of binary string where each string is of size N, the task… Read More
Given an array arr[] of size N having distinct integers from 1 to N, the task is to count the minimum number of steps required… Read More
Given a binary string S of size (N – 1), the task is to find the lexicographically smallest permutation P of the first N natural… Read More
Given an array arr[] of size N, where arr[i] is natural numbers less than or equal to N, the task is to find all the… Read More
Given an array arr[] of length N and an integer K, the task is to find the maximize the length of the array by appending… Read More
Given a string find the number of unique permutations that can be obtained by swapping two indices such that the elements at these indices are… Read More
Given a positive integer N, the task is to find the number of integers of N digits having even digits at odd indices and prime… Read More