Selection Sort



Select Add Check Reset

We have a problem!! This set of numbers is not in order. We need to place them into ascending order (smallest to largest). To do this, we need an algorithm. An algorithm is a series of steps you use to solve a problem.

Here are the steps:

  1. Create another empty list the same size as the first one.

  2. Select the smallest number in the first list.

  3. Place the selected number at the first empty space of the new list.

  4. Repeat until all numbers in the new list are in the correct order.

This algorithm is called Selection Sort.

Above is a list of numbers that need sorting and an empty list to use. Click or tap the Select button to choose a number, then click or tap the Place button to place it into the empty list. When you're finished, click Check to see if you've sorted the numbers properly. Use the Reset button if you need to start over.

Copyright 2020© Joshua Rodgers, Arkansas River Education Service Cooperative, Arkansas Computer Science Initiative. All Rights Reserved.