mirror of
https://github.com/chefyuan/algorithm-base.git
synced 2026-03-10 11:54:43 +00:00
代码重构 【Github Actions】
This commit is contained in:
@@ -80,3 +80,4 @@ func dailyTemperatures(temperatures []int) []int {
|
||||
}
|
||||
return arr
|
||||
}
|
||||
```
|
||||
|
||||
@@ -111,7 +111,7 @@ func (mq *MaxQueue) Is_empty() bool {
|
||||
return mq.size == 0
|
||||
}
|
||||
|
||||
// Max_value 取最大值值,返回我们双端队列的对头即可,因为我们双端队列是单调递减的嘛
|
||||
// Max_value 取最大值值,返回我们双端队列的对头即可,因为我们双端队列是单调递减的嘛
|
||||
func (mq *MaxQueue) Max_value() int {
|
||||
if mq.Is_empty() { return -1 }
|
||||
return mq.deq[0]
|
||||
|
||||
@@ -116,4 +116,5 @@ func (m *MinStack) GetMin() int {
|
||||
return m.minStk[len(m.minStk) - 1]
|
||||
}
|
||||
```
|
||||
|
||||
###
|
||||
|
||||
Reference in New Issue
Block a user