LeetCode算法笔记-Day72
155. Min Stack
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.
1 | push(x) -- Push element x onto stack. |
1 | Example: |
最小栈
Answer:
1 | /** |
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.
1 | push(x) -- Push element x onto stack. |
1 | Example: |
1 | /** |
jsonContent: meta: false pages: false posts: title: true date: true path: true text: false raw: false content: false slug: false updated: false comments: false link: false permalink: false excerpt: false categories: true tags: true