摘要:
就是用另外一个单调stack来记录最小值就可以了,这个队列单调递减。class MinStack {public: void push(int x) { st.push(x); if (stm.empty() || stm.top() >= x) stm.push(... 阅读全文
posted @ 2014-11-10 09:52 1957 阅读(2667) 评论(1) 推荐(0)
|
|||
|
摘要:
就是用另外一个单调stack来记录最小值就可以了,这个队列单调递减。class MinStack {public: void push(int x) { st.push(x); if (stm.empty() || stm.top() >= x) stm.push(... 阅读全文
posted @ 2014-11-10 09:52 1957 阅读(2667) 评论(1) 推荐(0) |
|||