Skip to content
RED SAGSkills
medium10 pts · first answer countsstacks-and-queues

Queue built from two stacks

A queue is built from an "in" stack and an "out" stack. Dequeue pops from "out", and only when "out" is empty it moves everything from "in" to "out". What is the amortised cost per operation?

Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions