Write a method called reorder that accepts a queue of integers as a parameter and that puts the integers into sorted (nondecreasing) order, assuming that the queue is already sorted by absolute value. For example, if the queue stores [1, 2, −2, 4, −5, 8, −8, 12, −15], notice that the values appear in sorted order if you ignore the sign of the numbers. Your method should reorder the values so that the queue stores [−15, −8, −5, −2, 1, 2, 4, 8, 12]. Use one stack 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.