Search⌘ K
AI Features

Largest Rectangle in Histogram

Explore how to calculate the largest rectangle area in a histogram represented by an array of heights. Understand the problem constraints and develop an efficient O(n) time and space solution. This lesson helps you strengthen problem-solving skills essential for coding interviews.

Statement

Given an array of integers, heights, that represents the heights of bars in a histogram, find the area of the largest rectangle in the histogram, where the rectangle has a constant width of 11 unit for each bar.

Constraints

  • 1
...