Given a deck of unique integers, return the deck order that reveals cards in increasing order. Pattern focus: Queue for Task Simulation. Simulate the reveal process with queue order to reconstruct the hidden deck arrangement.
deck = array of unique card values
initial deck order that reveals cards in increasing order
Example 1:
Input:
deck = [17,13,11,2,3,5,7]
Output:
[2,13,3,11,5,17,7]
Explanation:
This arrangement reveals cards in sorted order.
Example 2:
Input:
deck = [1,1000]
Output:
[1,1000]
Explanation:
The two cards already satisfy the reveal order.