## Sorting array elements with set bits equal to K

Given an array of integers and a number . The task is to sort only those elements of the array whose total set bits are… Read More »

## Rearrange an array to maximize i*arr[i]

Given an array of N integers, you have to select all of these integers in any order. For every integer you select, you get points… Read More »

## Maximizing the elements with a[i+1] > a[i]

Given an array of N integers, rearrange the array elements such that the next array element is greater than the previous element ( > ).… Read More »

## Find K items with the lowest values

Given a list of items and their values. The task is to find k items with the lowest value. It is possible that two items… Read More »

## Find the k largest numbers after deleting the given elements

Given an array of integers, find the k largest number after deleting the given elements. In case of repeating elements, delete one instance for every… Read More »

## Minimum boxes required to carry all gifts

Given an array containing weights of gifts, and an integer K representing maximum weight a box can contain (All boxes are uniform). Each box carries… Read More »

## Permutation of an array that has smaller values from another array

Given two arrays A and B of equal size. The task is to print any permutation of array A such that the number of indices… Read More »

## Print array elements in alternatively increasing and decreasing order

Given an array of N elements. The task is to print the array elements in such a way that first two elements are in increasing… Read More »

## Rearrange all elements of array which are multiples of x in increasing order

Given an array of integers ‘arr’ and a number x, the task is to sort all the elements which are multiples of x of the… Read More »

## Sorting integer data from file and calculate execution time

Prerequisite: Selection Sort In this article, we are going to apply selection sort algorithm, in which the source of input is A FILE CONTAINING 10000… Read More »

## Covering maximum array elements with given value

Given total number of candies ‘X’, number of student ‘N’ and an array ‘arr’ which holds the value for the exact number of candies that… Read More »

## Number of anomalies in an array

Given an array A of N integers. An anomaly is a number for which the absolute difference between it and every other number in the… Read More »

## Minimum number of bottles required to fill K glasses

Given N glasses having water, and a list A of each of their capacity. The task is to find the minimum number of bottles required… Read More »

## K-th lexicographically smallest unique substring of a given string

Given a string S. The task is to print the K-th lexicographically smallest one among the different substrings of s. A substring of s is… Read More »

## Internal details of std::sort() in C++

Sorting is one of the most basic functions applied to data. It means arranging the data in a particular fashion, which can be increasing or… Read More »