Solve this problem in C++. Imagine you have the Queue class from your CSE225 lecture. Create a
Fantastic news! We've Found the answer you've been seeking!
Question:
Solve this problem in C++.
Imagine you have the Queue class from your CSE225 lecture. Create a queue (any size) in the main function. Enqueue a few items (user input or random or hard coded). Then write the necessray code that will keep the first item in the queue but removes all the other items. Do not print anything.
You cannot use any additional stack, queue, array, STL. You are only allowed to call the enqueue(), dequeue(), isEmpty(), isFull() functions.
............... Queue before: 7, 3, 9, 4, 6 Queue after: 7
............... Queue before: 5, 0, 2 Queue after: 5
............... Queue before: 3 Queue after: 3
Related Book For
Posted Date: