2016年5月9日
摘要: class Stack { public: // Push element x onto stack. void push(int x) { if(q1.empty()&&q2.empty()) q1.push(x); else if(!q1.empty()) q1.push(x); ... 阅读全文
posted @ 2016-05-09 10:00 summerkiki 阅读(154) 评论(0) 推荐(0) 编辑
摘要: class Queue { public: // Push element x to the back of queue. void push(int x) { s1.push(x); } // Removes the element from in front of queue. void pop(void) { if... 阅读全文
posted @ 2016-05-09 09:01 summerkiki 阅读(140) 评论(0) 推荐(0) 编辑