连续pop的时候,会反复执行不必要的copy,pop的时候留住stack2中的元素,保持可以持续pop的状态,push时再copy(Stack2, stack1)
点赞

相关推荐

牛客网
牛客网在线编程
牛客网题解
牛客企业服务