mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-08 16:54:50 +08:00
修改 0084.柱状图中最大的矩形 Go单调栈代码的格式
This commit is contained in:
@ -478,7 +478,6 @@ class Solution:
|
||||
|
||||
```go
|
||||
func largestRectangleArea(heights []int) int {
|
||||
// 声明max并初始化为0
|
||||
max := 0
|
||||
// 使用切片实现栈
|
||||
stack := make([]int, 0)
|
||||
@ -507,7 +506,6 @@ func largestRectangleArea(heights []int) int {
|
||||
}
|
||||
return max
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
### JavaScript:
|
||||
|
Reference in New Issue
Block a user