Largest Rectangular Area in Histogram






Find the largest rectangular area possible in a given histogram where the largest rectangle can be made of a number of contiguous bars. 

For simplicity, assume that all bars have same width and the width is 1 unit.

SAMPLE INPUT: 

{6, 2, 5, 4, 5, 1, 6} 

SAMPLE OUTPUT
12

CODE

Comments

Popular posts from this blog

C library function - qsort()

Solution For LRU Stack

Find The Ring (PUZZLE)