Sunday, November 27, 2016

How Fast Can You Sort a Deck of Cards?

OK I admit it – sorting fascinates me. No, really it does. OF course it is also an important topic for computer science classes. CS Unplugged has a lot of resources for teaching/learning sorting algorithms. Hadi Partovi of Code.Org shared a link for a very cool Sorting Algorithms Animations web page. They're all pretty cool. It’s nice to have multiple tools in your toolbox for something like this. Recently I tried something new with my freshmen.

I asked my students who thought they could sort a deck of cards the fastest. Could they do it faster as an individual or as part of a team? Freshmen being freshmen there were several who thought they could do it faster as an individual. Others liked the team idea. So tried it. I took out a deck of cards and shuffled it. Then I timed a student as they sorted it. BTW the first discussion was “what does sorting a deck of cards mean?” Is it all Aces followed by all twos or is it Ace to King of one suit followed by Ace to King of the next suit? Does the order of the suits matter? All important questions that open the door to conversation about sorting.

Setting teams of students to the task is interesting in different ways. Using a team allows for some parallelism in the process. Most teams start with one person separating the cards by suit with the other team members sorting each individual suit. A really good team might split up the deck for the initial sorting by suit.  A good conversation can be had about those different techniques. One of the best discussions I have had involve asking why using four people is not four times as fast as only one person.

Everyone softs things from time to time but no one seems to think about it much. It is one of those things people just do. Thinking and talking about it is the first step towards doing to better. Using something common place like a deck of cards while looking closely about what is going on seems to be a good learning tool. Anyone else doing something like that? I’d love to hear other ideas.

(As an aside: the deck I used was the Notable Women in Tech Cards. I have the poster version on my lab wall as well. Good conversation starter.)

1 comment:

Mike Zamansky said...


More fun with cards and sorting: