previous
|
start
|
next
Sorting: answer?
If the top card is N, move to the bottom
Else if the top card number is > second card, swap
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