Sorting a deck of cards

How can we sort a deck of cards knowing that we can only look at the top cards, exchange the top cards, and moving the top card to the bottom of the stack?… Continue reading