Min Stack (Java)
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top() -- Get
原创
2014-12-22 21:10:37 ·
347 阅读 ·
0 评论