Given M sorted lists of variable length, print them in sorted order efficiently.
Implement Quicksort efficiently for inputs containing many repeated elements. Quicksort exhibits poor performance for inputs that contain many repeated elements. The problem is clearly visible when all the input elements are equal. Then at each recursion, the left partition is empty (no input values are less than the pivot), and the right partition …
Given a schedule containing arrival and departure time of trains in a station, find minimum number of platforms needed in the station so to avoid any delay in arrival of any train.
Given a set of intervals, print all non-overlapping intervals after merging overlapping intervals.
Given an array of integers, find the smallest window in array sorting which will make the entire array sorted in increasing order.
Find largest number possible from set of given numbers. The numbers should be appended to each other in any order to form the largest number.
Given an array of integers, find all distinct combinations of given length where repetition of elements is allowed.
Given an array of integers, find all distinct combinations of given length.
Given an array of integers, find maximum product of two integers in an array.
Given two sorted arrays X and Y of size m and n each where m >= n and X has exactly n vacant cells, merge elements of Y in their correct position in array X i.e. merge (X, Y) by keeping the sorted order.
Given two sorted arrays X and Y of size m and n each, merge elements of X with elements of array Y by maintaining the sorted order. i.e. fill X with first m smallest elements and fill Y with remaining elements. The conversion should be done in-place and without using any other data structure.
Given an array of integers, move all zeros present in the array to the end. The solution should maintain the relative order of items in the array.
Given an unsorted array of integers, find a pair with given sum in it .
Given an array containing only 0’s, 1’s and 2’s, sort the array in linear time and using constant space.