Building Blocks

For Educators

Menu

Programmers use different kinds of sorting algorithms to organize information in a computer program. A sorting algorithm is a set of step-by-step instructions that puts information in the correct order.

One kind of sorting algorithm is the selection sort. In a selection sort, you find the biggest or smallest piece of information in a list and pull it out of the list. Then, you put it in a new list, in the correct spot.

Can you use a selection sort to sort the giraffes from tallest to shortest?

- First download and print the giraffe cards and the savannah board from the materials section.
- Cut out the giraffe cards and shuffle them. Then, place them all in a row in front of you.
- Find the tallest giraffe and place it in the first slot on the picture.
- Then, find the giraffe that is now the tallest in your row.
- Put that giraffe in the second slot.
- Keep going until all of the giraffes are in order from tallest to shortest.

You used a selection sort to sort the giraffes!