ICode9

精准搜索请尝试: 精确搜索
  • 232.implement-queue-using-stacks 用栈实现队列2022-08-15 21:30:08

    当stOut为空时,将stIn中所有元素push到stOut #include <stack> using std::stack; class MyQueue { public: stack<int> stIn; stack<int> stOut; MyQueue() { } void push(int x) { stIn.push(x); } int pop() { if

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有