Largest Rectangle Area in a Histogram - MATLAB Cody - MATLAB Central

Problem 60421. Largest Rectangle Area in a Histogram

Difficulty:Rate
Given a histogram represented by an array of integers, e.g., [2, 1, 4, 5, 1, 3, 3] :
find the maximum area of a rectangle that can be formed using the histogram bars. In the example histogram, the maximum area is 8 units.

Solution Stats

85.71% Correct | 14.29% Incorrect
Last Solution submitted on Jun 11, 2024

Problem Comments

Solution Comments

Show comments
PIVlab surpasses 100K all-time File Exchange downloads
During the past twelve months, PIVlab, a MATLAB Community Toolbox for particle...
4
8
LLMs with MATLAB updated to support the latest OpenAI Models
Large Languge model with MATLAB, a free add-on that lets you access...
2
4

Problem Recent Solvers6

Suggested Problems

More from this Author53

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!