Skip to content

Tag Archives: Permutation and Combination

Given N distinct objects, the task is to find the number of distinct arrangements of N objects if all clockwise arrangements are considered the same.… Read More
Given a string S of length N, consisting of lowercase English alphabets only, the task is to find the minimum possible length of run-length-encoding that… Read More
Given two integers N and K, the task is to count the number of permutations of the first N natural numbers having exactly K inversions.… Read More
Given an array, arr[] of size N and an integer K, the task is to split the array into K non-intersecting subsets such that union… Read More
Given an integer N, the task is to find the number of permutations of integers from the range [1, N] that can form an acyclic… Read More
Given an array arr[] of size N, the task is to count possible pairs of array elements (arr[i], arr[j]) such that (arr[i] + arr[j]) *… Read More
Given three binary strings S1, S2, and S3 each of length N, the task is to find the maximum possible Bitwise XOR that can be… Read More
Given three integers N, X, and Y, the task is to find the count of N-digit numbers that can be formed using digits 0 to… Read More
Given three integers N, P, and K, the task is to find the total number of ways to divide N into K integers having sum… Read More
Given an integer N, the task is to count the total number of unimodal and non-unimodal permutations of integers [1, N] possible. A unimodal permutation… Read More
Given an array, arr[] of size N consisting of elements from the range [1, N], that represents the order, in which the elements are inserted… Read More
Given an array arr[] of size N representing the available denominations and an integer X. The task is to find any combination of the minimum… Read More
Given an array arr[] consisting of six integer digits only, the task is to return the maximum time in a 24-hour format that can be… Read More