## Merge M sorted lists of variable length

Given M sorted lists of variable length, print them in sorted order efficiently.

Read More Merge M sorted lists of variable lengthCoding made easy

Given M sorted lists of variable length, print them in sorted order efficiently.

Read More Merge M sorted lists of variable lengthGiven two Boolean arrays X and Y, find the length of longest continuous sequence that starts and ends at same index in both arrays and have same sum. In other words, find max(j-i+1) for every j >= i where sum of sub-array X[i, j] is equal to sum of sub-array Y[i, j].

Read More Length of longest continuous sequence with same sum in given binary arraysImplement 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 …

Read More Quicksort using Dutch National Flag AlgorithmIn this article, we will implement Ternary Search algorithm and compare its performance with Binary Search.

Read More Ternary Search vs Binary searchGiven a positive number N, find all combinations of 2*N elements such that every element from 1 to N appears exactly twice and distance between its two appearances is exactly equal to value of the element.

Read More All combinations of elements satisfying given constraintsGiven an array of integers, find sub-array in it that has maximum product of its elements.

Read More Find maximum product subarray in a given arrayThe longest increasing subsequence problem is to find a subsequence of a given sequence in which the subsequence’s elements are in sorted order, lowest to highest, and in which the subsequence is as long as possible. This subsequence is not necessarily contiguous, or unique.

Read More Longest Increasing SubsequenceGiven a list containing future prediction of share prices, find maximum profit that can be earned by buying and selling shares any number of times with constraint that a new transaction can only start after previous transaction is complete. i.e. we can only hold at-most one share at a time.

Read More Maximum profit earned by buying and selling shares any number of timesFind maximum amount of water that can be trapped within given set of bars. Assume width of each bar is 1 unit.

Read More Trapping Rain Water within given set of barsGiven 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.

Read More Find minimum number of platforms needed in the station so to avoid any delay in arrival of any trainGiven an array of integers, find the maximum sum of subsequence of given array where subsequence contains no adjacent elements.

Read More Find maximum sum of subsequence with no adjacent elementsGiven a set of intervals, print all non-overlapping intervals after merging overlapping intervals.

Read More Merging Overlapping IntervalsGiven a sequence consisting of ‘I’ and ‘D’ where ‘I’ denotes increasing sequence and ‘D’ denotes the decreasing sequence. Decode the given sequence to construct minimum number without repeated digits.

Read More Decode the given sequence to construct minimum number without repeated digitsGiven two sorted array of integers, find a path involving elements of both arrays whose sum is maximum. We can start from either arrays but we can switch between arrays only through its common elements.

Read More Find maximum sum path involving elements of given arrays