Skip to content
This repository was archived by the owner on Sep 22, 2021. It is now read-only.

0084 - Largest Rectangle in Histogram #776

Closed
UdeshAthukorala opened this issue Oct 13, 2020 · 2 comments · Fixed by #790
Closed

0084 - Largest Rectangle in Histogram #776

UdeshAthukorala opened this issue Oct 13, 2020 · 2 comments · Fixed by #790
Assignees

Comments

@UdeshAthukorala
Copy link
Contributor

Description of the Problem

Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histogram.

image
Above is a histogram where width of each bar is 1, given height = [2,1,5,6,2,3].

image
The largest rectangle is shown in the shaded area, which has area = 10 unit.

Example:

Input: [2,1,5,6,2,3]
Output: 10

Code

class Solution:
    def largestRectangleArea(self, heights: List[int]) -> int:

Link To The LeetCode Problem

LeetCode

@UdeshAthukorala
Copy link
Contributor Author

@vJechsmayr Hey, I'd like to work on this problem. Can you please assign it to me?

@vJechsmayr
Copy link
Owner

@UdeshAthukorala Waiting for your PR 😸

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants