摘要: 题目描述 用两个栈来实现一个队列,完成队列的Push和Pop操作。 队列中的元素为int类型。 水题,直接上代码: class Solution { public: void push(int node) { stack1.push(node); } int pop() { if (stack2.empty()) { while (... 阅读全文
posted @ 2015-05-11 12:38 Acjx 阅读(394) 评论(0) 推荐(0) 编辑