We are trying to use two stacks to implement a queue. Name the
two stacks as E and D. We will enqueue into E and dequeue from D.
To implement enqueue(e), simply call E.push(e). To implement
dequeue(), simply call D.pop(), provided that D is not empty. If D
is empty, iteratively pop every element from E and push it onto D,
until E is empty, and then call D.pop().
Considering the worst case running time, what is the
performance in...