Skip to content

Tag Archives: permutation

Given two integers N and S, the task is to find a circular permutation of numbers from the range [0, 2(N – 1)], starting with… Read More
Given an array nums[] of size N, the task is to print all possible distinct permutations of the array nums[] (including duplicates). Input: nums[] =… Read More
Given an array arr[] of size N, the task is to find the lexicographically smallest permutation of the given array such that the sum of… Read More
Given two positive integers N and K, the task is to find lexicographically the smallest permutation of first N natural numbers such that there are… Read More
Given a positive integer N, the task for any permutation of size N having elements over the range [0, N – 1], is to calculate… Read More
Given a positive integer N, the task is to find the permutation of first N natural numbers such that the product of Bitwise AND(&) of… Read More
Given two arrays arr1[] and arr2[], both of size N and an integer X, the task is to check if the sum of same-indexed elements… Read More
Given two positive integers A and C, the task is to check if a number B exists such that A + B = C and… Read More
Given a positive integer N, the task is to rearrange the digits of the given integer such that the integer becomes a power of 2.… Read More
Given an array arr[] consisting of a permutation of first N natural numbers, the task is to find the maximum possible value of ΣGCD(arr[i], i)… Read More
Given an array arr[] consisting of N characters, the task is to generate all possible combinations of at most X elements ( 1 ≤ X… Read More
Given an array arr[] consisting of N integers and a positive integer K, the task is to find all permutations of the array arr[] such… Read More
Given an integer N, the task is to count the numbers less than or equal to N such that each number contains at least one… Read More

Start Your Coding Journey Now!