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

Stack built from one queue

A stack is built from one queue. To push x, you enqueue it and then dequeue and re-enqueue the other items so x is at the front. What is the cost of push and pop?

Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions