Find the largest rectangular are in a histogram where largest area can be made up of contiguous bars.
For simplicity, assume that all bars have same width of 1 unit.
Given a value N, we want to make change for N cents and we have infinite supply of each of S={S1, S2...Sm}valued coins, how many ways we can make the change? The order of coins does not matter.
For example for N=4, and S={1,2,3}, there are four solutions: {1,1,1,1}, {1,1,2}, {2,2},{1,3}. So output should be 4.