Before Becoming A Card Shark, You Need To Know This Method - Part 1

Computer Science Level 1

Alice and Bob are each sorting out a deck of standard poker cards (13 cards in each suit, 4 suits per deck). They have each adopted a different approach to sorting the cards into order (ordered ascending by value within suits, with the suits in order hearts, spades, diamonds, clubs).

Alice looks through the deck until she finds the ace of hearts, then sets it aside and starts over. Then she looks for the two of hearts until she finds it, then sets it aside. She continues in this way until she's put the cards in order.

Bob first goes through the entire deck and sorts every card into piles based on suit (4 piles). After he's finished, he picks up the pile of hearts and proceeds to use Alice's method (namely, he looks for the ace, then the two, etc., each time moving them to the correct pile when finished).

Assuming the cards are ordered randomly, in what order would we expect them to finish?

Image Credit: Johnny Blood

Problem Loading...

Note Loading...

Set Loading...