栈
练习:Valid Parentheses(有效的括号)
1 | class Solution(object): |
Longest Valid Parentheses(最长有效的括号)(作为可选)
1 | class Solution: |
Evaluate Reverse Polish Notatio(逆波兰表达式求值)
1 | class Solution(object): |
队列
练习:Design Circular Deque(设计一个双端队列)
1 | class MyCircularDeque(object): |
Sliding Window Maximum(滑动窗口最大值)
1 | from collections import deque |
递归
练习:Climbing Stairs(爬楼梯)
1 | class Solution(object): |