Find all N-digit strictly increasing numbers where N varies from [1 to 9]. If we process the number from left to right and for every pair of adjacent digits, if every digit is greater than the preceding digit, we can say that the digits are strictly increasing.
Given a binary tree, write an efficient algorithm to check if tree is height balanced or not. In a height balanced tree, the absolute difference between height of left subtree and right subtree for every node is 0 or 1.
Given an array of integers, find and print contiguous subarray with maximum sum in it.
Given an array of integers, check if array contains a sub-array having 0 sum.
Given 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.
Given a string and a pattern containing wildcard characters i.e. ‘*’ and ‘?’, where ‘?’ can match to any single character in input string and ‘*’ can match to any number of characters including zero characters, design an efficient algorithm to find if the pattern matches with the complete input string or not.
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.
Given an array of integers, find sub-array in it that has maximum product of its elements.
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.
Find maximum amount of water that can be trapped within given set of bars. Assume width of each bar is 1 unit.
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 an array of integers, find the maximum sum of subsequence of given array where subsequence contains no adjacent elements.