Sorting Race

Three algorithms. Same data. Which wins?


Year 9 Computer Science — Sorting Algorithms

Warm-Up Challenge

You have 10 shuffled numbered cards.

Sort them in order. 30 seconds. GO.


What method did you use?

Was it the same across all groups?


Today: we'll compare 3 specific, mechanical algorithms.

Three Algorithms

Bubble Sort
Compare adjacent pairs; swap if wrong order. Repeat.
Selection Sort
Find the minimum remaining; place it in position. Repeat.
Insertion Sort
Take each card; slide it left into correct position among sorted cards.

Use the Algorithm Reference Card — follow it exactly!

Round 1: Bubble Sort

Shuffle your cards to the starting order.

Follow the reference card step by step.

Count every comparison and every swap on the tally sheet.


Complete all passes until no swaps happen in a full pass.

Round 2: Selection Sort

Re-shuffle to the same starting order.

Follow the Selection Sort rules on the reference card.

Count comparisons and swaps.


Note: Selection Sort always makes exactly n−1 selections and at most n−1 swaps.

Round 3: Insertion Sort

Re-shuffle to the same starting order again.

Follow the Insertion Sort rules.

Count comparisons and shifts/swaps.


Watch: what happens with a card that's already in the right place?

Compare Results

Fill in the summary table on your worksheet.

Compare across the class:

Does Starting Order Matter?

Try a nearly-sorted starting order: 1,2,3,4,6,5,7,8,9,10

Which algorithm handles this most efficiently?


Try reverse-sorted: 10,9,8,7,6,5,4,3,2,1

Which is now worst?

Key Takeaway

Different sorting algorithms take different numbers of steps.

The best choice depends on your data — its size, its initial order, and whether swaps or comparisons are more costly.

Algorithm selection matters as much as correctness.
1 / 9