# Category Archives: Sorting

Given an array arr[] of size N and integer K, the task is to maximize the sum of the array by performing the following operationsâ€¦ Read More
Given an array, arr[] of size N and an integer K. If a value in arr[] is less than or equal to K, then thatâ€¦ Read More
Given an array, arr[] of size N., The task is to perform minimum increment or decrement operations on the elements of the array, to makeâ€¦ Read More
Given an array of positive integer arr[], and a number K. the task is to maximize the sum of the array by replacing any Kâ€¦ Read More
Given an array arr[] of N positive numbers and an integer M. The task is to maximize the value of M by adding array elementsâ€¦ Read More
A pair is a container that stores two values mapped to each other, and a vector containing multiple numbers of such pairs is called aâ€¦ Read More
Given an array arr[] of distinct integers of size N and an integer K, The task is to find the total no of possible pairsâ€¦ Read More
Given a sorted array arr[] of size N, the task is to find the number of unique elements in this array.  Note: The array isâ€¦ Read More
Given an array arr[] of size N, the task is to find the minimum number of operations required to make the array a permutation ofâ€¦ Read More
Given an array arr[] of size N, the task is to minimize the  cost to sort the array by sorting any unsorted subarray where theâ€¦ Read More
Given an array of positive integers. We are required to write a program to print the minimum product of any two numbers of the givenâ€¦ Read More
Given an array of positive integers. We are required to write a program to print the minimum product of any two numbers of the givenâ€¦ Read More
Given two arrays arr[] and brr[] containing integers. The task is to find the Kth largest product of a pair (arr[i], brr[j]). Examples:  Input: arr[]â€¦ Read More
Given an array arr[] containing N lowercase English alphabets, the task is to sort this array arr[] using a linked list. Examples:   Input: arr[]â€¦ Read More
Given an ascending sorted array arr[] of size N and an integer K, the task is to partition the given array into K non-empty subarraysâ€¦ Read More