Given an array of integers between 0 to 9, find two numbers with maximum sum formed by using all digits of the array. The difference in number of digits of the two numbers should be ± 1.
Given an array of integers, find a triplet having maximum product in the array.
In this post, we will see how to sort an array of integers using iterative merge sort algorithm.
Given an array of integers, find all distinct combinations of given length.
Given an unsorted array of integers, print all distinct four elements tuple (Quadruplets) in it having given sum.
Given an unsorted array of integers, check if it contains four elements tuple (Quadruplets) having given sum.
Given an array where all its elements are sorted except two elements which were swapped, sort the array in linear time. Assume there are no duplicates in the array.
Implement Quicksort algorithm using Hoare’s Partitioning scheme.
Given an array of integers having distinct elements, find the surpasser count for each element in it. In other words, for each element of the array, find the number of elements to its right which are greater than it.
Given M sorted lists of variable length, print them in sorted order efficiently.
Given a collection of n items, each of which has a non-negative integer key whose maximum value is at most k, effectively sort it using counting sort algorithm.
Given an array with many duplicated elements, write an algorithm to efficiently sort it in linear time where the order of equal elements doesn’t matter.