Copy a queue. Create a new constructor so that
Queue
- r = new Queue
- (q);
makes r a reference to a new and independent copy of the queue q. You should be able to enqueue and dequeue from either q or r without influencing the other. Hint : Delete all of the elements from q and add these elements to both q and r.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.