how to use stack(s) to realize a queque# Programming - 葵花宝典
a*g
1 楼
An interview question. I proposed using two stacks, whenever changing action
(pop->push or push->pop), put all data from one stack to the other. I was
told it was too slow.
Any idea? thanks
(pop->push or push->pop), put all data from one stack to the other. I was
told it was too slow.
Any idea? thanks