A bridge catalogue has a machine for dealing cards. It can take a randomly arranged deck and divide it into four piles in any way you choose, but the order of the cards in each pile will be in the same order as they were in the deck.
Example:
Deck starts as {5H 4C 3S 4S 4H 2D 3D 5S 2S 2C 5D 2H 5C 3C 4D 3H}
Sort by suits creates piles:
{5H 4H 2H 3H} {4C 2C 5C 3C} {2D 3D 5D 4D} {3S 4S 5S 2S}
Suppose that we run a deck through the machine several times, each
time taking the four piles and placing them on top of each other in a
fixed order. How many runs does it take to sort a deck into complete
rank order, from ace of clubs to king of spades?
This can be solved using a Radix Sort, and since 4^3>52, only 3 runs will be needed.
Number the cards from 1 to 52: AC=1, 2C=2, ... KC=13, ... KS=52. Write those numbers in base 4, using three digits: AC=001, 2C=002, ... KS=310.
Now, first sort the cards according to the THIRD digit, and place the piles so cards with a 0 are on top, followed by cards with 1, 2, and 3 in that order. Second, do the same process but working with the SECOND digit. Finally, do the process once more, but working with the FIRST digit. Done!