auto commit
This commit is contained in:
@ -1,14 +1,14 @@
|
||||
<!-- GFM-TOC -->
|
||||
* [用栈实现队列](#用栈实现队列)
|
||||
* [用队列实现栈](#用队列实现栈)
|
||||
* [最小值栈](#最小值栈)
|
||||
* [用栈实现括号匹配](#用栈实现括号匹配)
|
||||
* [数组中元素与下一个比它大的元素之间的距离](#数组中元素与下一个比它大的元素之间的距离)
|
||||
* [循环数组中比当前元素大的下一个元素](#循环数组中比当前元素大的下一个元素)
|
||||
* [1. 用栈实现队列](#1-用栈实现队列)
|
||||
* [2. 用队列实现栈](#2-用队列实现栈)
|
||||
* [3. 最小值栈](#3-最小值栈)
|
||||
* [4. 用栈实现括号匹配](#4-用栈实现括号匹配)
|
||||
* [5. 数组中元素与下一个比它大的元素之间的距离](#5-数组中元素与下一个比它大的元素之间的距离)
|
||||
* [6. 循环数组中比当前元素大的下一个元素](#6-循环数组中比当前元素大的下一个元素)
|
||||
<!-- GFM-TOC -->
|
||||
|
||||
|
||||
# 用栈实现队列
|
||||
# 1. 用栈实现队列
|
||||
|
||||
[232. Implement Queue using Stacks (Easy)](https://leetcode.com/problems/implement-queue-using-stacks/description/)
|
||||
|
||||
@ -48,7 +48,7 @@ class MyQueue {
|
||||
}
|
||||
```
|
||||
|
||||
# 用队列实现栈
|
||||
# 2. 用队列实现栈
|
||||
|
||||
[225. Implement Stack using Queues (Easy)](https://leetcode.com/problems/implement-stack-using-queues/description/)
|
||||
|
||||
@ -85,7 +85,7 @@ class MyStack {
|
||||
}
|
||||
```
|
||||
|
||||
# 最小值栈
|
||||
# 3. 最小值栈
|
||||
|
||||
[155. Min Stack (Easy)](https://leetcode.com/problems/min-stack/description/)
|
||||
|
||||
@ -126,7 +126,7 @@ class MinStack {
|
||||
|
||||
对于实现最小值队列问题,可以先将队列使用栈来实现,然后就将问题转换为最小值栈,这个问题出现在 编程之美:3.7。
|
||||
|
||||
# 用栈实现括号匹配
|
||||
# 4. 用栈实现括号匹配
|
||||
|
||||
[20. Valid Parentheses (Easy)](https://leetcode.com/problems/valid-parentheses/description/)
|
||||
|
||||
@ -159,7 +159,7 @@ public boolean isValid(String s) {
|
||||
}
|
||||
```
|
||||
|
||||
# 数组中元素与下一个比它大的元素之间的距离
|
||||
# 5. 数组中元素与下一个比它大的元素之间的距离
|
||||
|
||||
[739. Daily Temperatures (Medium)](https://leetcode.com/problems/daily-temperatures/description/)
|
||||
|
||||
@ -186,7 +186,7 @@ public int[] dailyTemperatures(int[] temperatures) {
|
||||
}
|
||||
```
|
||||
|
||||
# 循环数组中比当前元素大的下一个元素
|
||||
# 6. 循环数组中比当前元素大的下一个元素
|
||||
|
||||
[503. Next Greater Element II (Medium)](https://leetcode.com/problems/next-greater-element-ii/description/)
|
||||
|
||||
|
Reference in New Issue
Block a user