Sort a deck of cards with only these operations:
For simplicity assume the cards are numbered 1 to N.