阅读背景:

Chapter 3 | Stacks and Queues--实现一个函数返回栈中的最小值,时间复杂度为O(1)

来源:互联网 

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, popand min should all operate in O(1) time. How would you design a stack which, in add




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: