Given a queue with two stack members, implement enqueue
and dequeue
.
Algorithm input consists of a queue data structure with stack members. enqueue
takes a value argument.
Output from dequeue
are the values in FIFO order.
Stack has len
, pop
, and push
.
Whiteboard Images