950. Reveal Cards In Increasing Order
好像只能照做 對呀==
vector<int> deckRevealedIncreasing(vector<int>& deck) {
queue<int> q;
for(int i=0; i<deck.size(); i++)
{
q.push(i);
}
sort(deck.begin(), deck.end());
vector<int> ans(deck.size(), 0);
int deck_idx = 0;
while(!q.empty())
{
ans[q.front()] = deck[deck_idx];
q.pop();
q.push(q.front());
q.pop();
deck_idx++;
}
return ans;
}