TheAlgorithms / Python

All Algorithms implemented in Python
https://thealgorithms.github.io/Python/
MIT License
194.7k stars 45.82k forks source link

adding optimized code for largest rectangle histogram #12268

Open Avnee29 opened 1 month ago

Avnee29 commented 1 month ago

Feature description

You are given an array of integers heights where heights[i] represents the height of a bar. The width of each bar is 1.

Return the area of the largest rectangle that can be formed among the bars. giving optimized solution for this problem using stacks
kindly assign me this issue

rushikeshkotkar04 commented 1 month ago

I'm working on this Feature