Skip to content

Commit a8f0fe9

Browse files
authored
Update largest-rectangle-in-histogram.py
1 parent 8af1290 commit a8f0fe9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/largest-rectangle-in-histogram.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ def largestRectangleArea(self, heights):
77
:type heights: List[int]
88
:rtype: int
99
"""
10-
stk, result, i = [-1], 0, 0
10+
stk, result = [-1], 0
1111
for i in xrange(len(heights)+1):
1212
while stk[-1] != -1 and (i == len(heights) or heights[stk[-1]] >= heights[i]):
1313
result = max(result, heights[stk.pop()]*((i-1)-stk[-1]))

0 commit comments

Comments
 (0)