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
Category Archives: Sorting
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 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