terminal
Elevo
/
ESC
Login
Initiate Registration
code
Topics
corporate_fare
Companies
history
History
arrow_back
Back to Challenges
#84
Largest Rectangle in Histogram
Hard
Acceptance 0%
Editorial
description
Problem Description
Given an array of integers `heights` representing the histogram's bar height where the width of each bar is `1`, return the area of the largest rectangle in the histogram.
checklist
Constraints
1 <= heights.length <= 10^5
0 <= heights[i] <= 10^4
science
Examples
Case #1
In:
heights = [2,1,5,6,2,3]
Out:
10
Case #2
In:
heights = [2,4]
Out:
4
Mastery Tags
Arrays
Stack
Hiring Companies
Amazon
Google
Microsoft
code
Integrated IDE
Python 3
expand_more
C
C++ 17
Java
JavaScript
Python 3
C
C++ 17
Java
JavaScript
Python 3
refresh
class Solution: def largestRectangleArea(self, heights: list[int]) -> int: pass
Login to Compile
Processing
terminal
Debug Output
home
Home
extension
Practice
robot_2
login
Sign In
account_circle
Menu
code_blocks
Coding
psychology
Aptitude
Navigation
close
Login
Registration