Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Create a program to find the largest rectangle area in a histogram represented as an array.

Hard

Problem Statement

Create a program to find the largest rectangle area in a histogram represented as an array.

Sample Input

Heights: 2, 1, 5, 6, 2, 3

Sample Output

Largest Rectangle Area: 10

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
using System; class HistogramRectangle { static void Main() { // Find the largest rectangle area in the histogram } }
Log in or sign up to run or submit your code.Log inSign up
Input
Heights: 2, 1, 5, 6, 2, 3
Expected Output
Largest Rectangle Area: 10