Given a deck of distinct integers, arrange it so that repeatedly revealing the top card and moving the next card to the bottom yields the cards in increasing order. Return that arrangement. The input is JSON {deck}.
Input: JSON {deck}.
Output: Array — the ordered deck.
Input: {"deck":[17,13,11,2,3,5,7]}
Output: [2,13,3,11,5,17,7]
Explanation: Reveals in increasing order.Input: {"deck":[1,1000]}
Output: [1,1000]
Explanation: Two cards.Input: {"deck":[5]}
Output: [5]
Explanation: Single card.1<=n<=1000distinct values