Given an array of bar heights in a histogram, find the area of the largest rectangle.
Input: heights=[2,1,5,6,2,3] Output: 10 Input: heights=[2,4] Output: 4
Unlock hints progressively β start gentle, go deeper only if needed.
Level 1: Gentle Nudge
A subtle direction
Level 2: Approach
The algorithm to use
Level 3: Detailed
Step-by-step guidance
to save progress and use AI features