Challenge 4: Implement a Queue Using Stacks
You have seen the difference between stacks and queues. But is it possible to make one from the other? Let's find out!
We'll cover the following...
Problem statement
You have to implement enqueue()
and dequeue()
functions in the newQueue
class by using the myStack
class created earlier. enqueue()
will insert a value into the queue and dequeue
will ...