You are given an array which represents the heights of every bar of a
histogram. Now all these bars are contiguous (juxtaposed wrt each
other) and have the same width.
For Example, A={2,1,4} represents a histogram having 3 bars of height
2,1and 4 in that order. Now you need to find a rectangle in this
histogram that has the maximum area.
See figure: http://www.ocf.berkeley.edu/~wwu/YaBBAttachments/hist_rect.gif
Time Complexity: O(n)
Space Complexity:O(1)-- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
