Activity 10: Sorting Race
How it works
Each round is a race. Four people sort at the same time, each with their own cards and their own sort:
- Insertion sort
- Selection sort
- Merge sort
- Freestyle: any strategy you like, including "vibes"
The 5th person has a timer and lets everyone know when to start. When each person is done they say "done" and the timer notes down their time (but keeps the timer running until everyone is done!) then notes the results in the Google Form.
With a 6th person, they're the checker: they supervise to make sure folks are doing the right algorithm, and they check the cards are in order at the end.
Swap roles for round 2, so someone new is timing, and no one does the same algorithm twice.
The sorts, by hand
Lay your cards face up in a row, in the starting order.
Insertion sort. The leftmost card is your sorted row. Take the next card to its right and slide it left past every bigger card. Repeat until no cards are left.
Selection sort. Find the smallest card that isn't sorted yet. Move it to the end of your sorted row. Repeat.
Merge sort. Split the row into two piles. Keep splitting until every pile is one card. Then merge piles in pairs: look only at the smallest card of each pile, and take the smaller of the two. Keep merging until you have one pile.
The space below is for making notes, but you'll need to submit on the Google Form in the end!
Round 1: 8 cards
Starting order: 60 30 80 10 50 20 70 40
Which sort do you predict will win? ______________
| Sort | Sorter | Time (seconds) |
|---|---|---|
| Insertion | ||
| Selection | ||
| Merge | ||
| Freestyle |
Freestyle strategy:
Round 2: 16 cards
Starting order: 110 40 150 80 10 130 60 100 30 160 90 20 140 70 120 50
Which sort do you predict will win? ______________
| Sort | Sorter | Time (seconds) |
|---|---|---|
| Insertion | ||
| Selection | ||
| Merge | ||
| Freestyle |
Freestyle strategy:
While you wait
- Which sort felt easiest to do by hand? Which felt slowest? Why?
- A computer sorting 1,000,000 numbers: which of these sorts would you pick? Is that the same one that won for you?