previous | start | next

Sorting: answer?

  1. If the top card is N, move to the bottom
  2. Else if the top card number is > second card, swap
  3. Else move the top card to the bottom.

If N cards are moved to the bottom with no swaps and the top card is 1, the deck is sorted.



previous | start | next