## Find Triplet with given sum in an array

Given an unsorted array of integers, find a triplet with given sum in it.

Read More Find Triplet with given sum in an arrayCoding made easy

Given an unsorted array of integers, find a triplet with given sum in it.

Read More Find Triplet with given sum in an arrayGiven M sorted lists of variable length, print them in sorted order efficiently.

Read More Merge M sorted lists of variable lengthGiven a string, calculate its rank among all its lexicographically sorted permutations. For example, consider below lexicographically sorted permutations

Read More Calculate rank of given string among all its lexicographically sorted permutationsThe longest common subsequence (LCS) problem is the problem of finding the longest subsequence that is present in given two sequences in the same order. i.e. find a longest sequence which can be obtained from the first original sequence by deleting some items, and from the second original sequence by deleting other items.

Read More Longest Common Subsequence of K-sequencesHuffman Coding is a algorithm for doing data compression and it forms the basic idea behind file compression. This post talks about fixed length and variable length encoding, uniquely decodable codes, prefix rules and construction of Huffman Tree.

Read More Huffman CodingThe 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 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 a set of intervals, print all non-overlapping intervals after merging overlapping intervals.

Read More Merging Overlapping IntervalsGiven an array of integers, find all distinct combinations of given length where repetition of elements is allowed.

Read More Find all distinct combinations of given length with repetition allowedGiven an array of integers, find all distinct combinations of given length.

Read More Find all distinct combinations of given lengthGiven an binary array containing 0 and 1, find maximum length sub-array having equal number of 0’s and 1’s.

Read More Find maximum length sub-array having equal number of 0’s and 1’sGiven an array of integers, find maximum length sub-array having given sum.

Read More Find maximum length sub-array having given sumGiven an array of integers, check if array contains a sub-array having 0 sum. Also, prints end-points of all such sub-arrays.

Read More Find sub-array with 0 sumGiven an array of integers containing duplicates, return the majority element in an array if present. A majority element appears more than n/2 times where n is the size of the array.

Read More Find majority element in an array (Boyer–Moore majority vote algorithm)