Write a method called mirrorHalves that accepts a queue of integers as a parameter and replaces each half of that queue with itself plus a mirrored version of itself (the same elements in the opposite order). For example, if the queue stores [10, 50, 19, 54, 30, 67], your method should change it to store [10, 50, 19, 19, 50, 10, 54, 30, 67, 67, 30, 54]. If your method is passed an empty queue, the result should be an empty queue. If your method is passed a queue whose size is not even, throw an IllegalArgumentException. Use one stack or one queue (but not both) as auxiliary storage.
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.