71. 简化路径 https://leetcode.cn/problems/simplify-path
71. Simplify Path https://leetcode.com/problems/simplify-path
143. 重排链表 https://leetcode.cn/problems/reorder-list
143. Reorder List https://leetcode.com/problems/reorder-list
20. 有效的括号 https://leetcode.cn/problems/valid-parentheses
20. Valid Parentheses https://leetcode.com/problems/valid-parentheses
150. 逆波兰表达式求值 https://leetcode.cn/problems/evaluate-reverse-polish-notation
150. Evaluate Reverse Polish Notation https://leetcode.com/problems/evaluate-reverse-polish-notation
225. 用队列实现栈 https://leetcode.cn/problems/implement-stack-using-queues
225. Implement Stack using Queues https://leetcode.com/problems/implement-stack-using-queues
388. 文件的最长绝对路径 https://leetcode.cn/problems/longest-absolute-file-path
388. Longest Absolute File Path https://leetcode.com/problems/longest-absolute-file-path
155. 最小栈 https://leetcode.cn/problems/min-stack
155. Min Stack https://leetcode.com/problems/min-stack
895. 最大频率栈 https://leetcode.cn/problems/maximum-frequency-stack
895. Maximum Frequency Stack https://leetcode.com/problems/maximum-frequency-stack
Prerequisites
Before reading this article, you need to learn:
For the stack data structure, the main focus is on the application of the LIFO property, such as in expression evaluation, bracket validity checking, and other problems. Below are some classic scenarios where stacks are used.