Problem 85 · Hard

Maximal Rectangle

Find the largest rectangle made entirely of ones in a binary grid. The visual turns each row into a histogram of column heights and reuses the histogram method on each one.

Open the interactive visualisation