AlgoMaster Logo

Largest Rectangle in Histogram

heights=[2, 1, 5, 6, 2, 3]
0 / 23
algomaster.io
Step:Brute force: try every bar as the shortest bar of a rectangle.