Practice Problem

Largest Rectangle in Histogram

Difficulty: Hard

Given an array of bar heights representing a histogram, find the area of the largest rectangle that can be formed within the histogram.