
stack
MVincent
这个作者很懒,什么都没留下…
展开
-
leetcode 232 Implement Queue using Stacks
python:class MyQueue: def __init__(self): """ Initialize your data structure here. """ self.s1 = [] self.s2 = [] def push(self, x): """ ...原创 2018-06-22 12:41:16 · 190 阅读 · 0 评论 -
leetcode 155 Min Stack
python: class MinStack: def __init__(self): """ initialize your data structure here. """ self.stack = [] def push(self, x): """ :ty...原创 2018-10-25 09:39:17 · 232 阅读 · 0 评论