Queue implementation Stack \ Stack queue

A stack of two queues

Two stacks a queue

push the stack

pop stack

pop stack of non-null, push impenetrability pop stack

pop the stack is empty, push poured pop up push is empty.

Guess you like

Origin www.cnblogs.com/bowenqianngzhibushiwo/p/11620802.html