# Category Archives: Sorting

Given two strings A and B of length M and N respectively, the task is to find the minimize swapping of two characters required to… Read More
Given an array A[] of size N (1 ≤ N ≤ 105), the task is to calculate the number of swaps required to sort the… Read More
Given two arrays A[] and B[] consisting of N integers and an integer K, the task is to find the maximum value of B[i] +… Read More
Given an array A[] consisting of N positive integers and an integer X, the task is to determine if it is possible to convert all… Read More
Given two arrays arr1[] and arr2[] consisting of N and M integers respectively, and two integers X and Y, the task is to check if… Read More
Given an array arr[] of size N, the task is to split the array into two subsets such that the Bitwise XOR between the maximum… Read More
Given two arrays arr[] and brr[] of size N and M respectively, the task is to count the maximum number of elements that can be… Read More
Given an array of pairs arr[] of size N, the task is to find any two pairs (a, b) and (c, d) such that a… Read More
Given an array arr[] consisting of N positive integers, the task is to left-shift the digits of array elements such that the array modifies to… Read More
Given an array of strings Files[], representing name of some files, the task is to sort the array based on the lexicographical order of the… Read More
Given an array arr[] consisting of N integers and an integer X, the task is to perform integer division on the array elements by X… Read More
Given an array arr[] and an integer value K, the task is to count the maximum number of array elements that can be selected such… Read More
Given a array of strings S[] of size N (1 ≤ N ≤ 105), sort characters of each string in descending order and then print… Read More
Given an array arr[] consisting of 2* N elements in the form of { a1, a2, …, aN, b1, b2, …, bN }, the task… Read More
Given a 2D array arr[][] of size N, with each row representing intervals of the form {X, Y} ( 1-based indexing ), the task to… Read More