码迷,mamicode.com
首页 > 其他好文 > 详细

[CareerCup] 3.2 Min Stack 最小栈

时间:2015-07-25 13:46:14      阅读:120      评论:0      收藏:0      [点我收藏+]

标签:

 

3.2 How would you design a stack which, in addition to push and pop, also has a function min which returns the minimum element? Push, pop and min should all operate in O(1) time.

 

LeetCode上的原题,请参见我之前的博客Min Stack 最小栈

 

[CareerCup] 3.2 Min Stack 最小栈

标签:

原文地址:http://www.cnblogs.com/grandyang/p/4675699.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!