## Longest Increasing Subsequence

The 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.

## Find maximum product subarray in a given array

Given an array of integers, find maximum product subarray. In other words, find a sub-array that has maximum product of its elements.

## Maximum profit earned by buying and selling shares any number of times

Given 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.

## Trapping Rain Water within given set of bars

In trapping rain water problem, we need to find the maximum amount of water that can be trapped within given set of bars where width of each bar is 1 unit.

## Merging Overlapping Intervals

Given a set of intervals, print all non-overlapping intervals after merging overlapping intervals.

## Decode the given sequence to construct minimum number without repeated digits

Given 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.

## Find maximum sum path involving elements of given arrays

Given two sorted array of integers, find a maximum sum 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.

## Find subarray having given sum in given array of integers

Given an array of integers, find a subarray having given sum in it.

## Find minimum sum subarray of given size k

Given an array of integers, find minimum sum sub-array of given size k.

## Maximum Subarray Problem (Kadane’s algorithm)

Given an array of integers, find contiguous subarray within it which has the largest sum.

## Find maximum difference between two elements in the array by satisfying given constraints

Given an array of integers, find the maximum difference between two elements in the array such that smaller element appears before the larger element.

## Find largest sub-array formed by consecutive integers

Given an array of integers, find largest sub-array formed by consecutive integers. The sub-array should contain all distinct values.