Sorting Algorithms

Lightest and Heaviest #

Almost any list that comes out of a computer is sorted into some sort of order, and there are many more sorted lists inside computers that the user doesn’t see. Many clever algorithms have been devised for putting values into order efficiently.

In this activity students compare different algorithms to sort weights in order.

Bubble Sort

Activity description (PDF) #

Translations and other versions #

Videos #

See our video page.

Photos #

An older version of this activity can be downloaded in PDF format here. The content is similar to the current version, but there’s some extra technical information.

More lessons and activities #

Sorting algorithms visualisations #

  • To visually demonstrate the concept of  some popular algorithms for sorting data, see the following website developed by David Martin at http://www.sorting-algorithms.com/.
  • Aldo Cortesi’s Canvas visualisation of algorithms is another way to visualise sorting algorithms by Jacob Seidelin at Canvas Visualizations of Sorting Algorithms Teachers could print these out for different search parameters for different sort algorithms and hang these canvases as posters in the classroom. These could then be used in quizzing the students on specific algorithms or comparing sorts side by side. See also Cortesi’s Blog at Visualising Sorting Algorithms
  • Another visual or timed view of sorting algorithms developed by David Eck can be seen at The xSortLab Applet.
  • Thomas Baudel has visualisations of sort algorithms at Sort Algorithms Visualizer

If you want to find out more #

Videos #

Additional resources #

Great Principles of Computer Science #

  • Computation

ACM K12 Curriculum #

  • Level I (Grades 3–5) Topic 11: develop a simple understanding of an algorithm
  • Level I (Grades K-12) Topic 12: Understand how to arrange (sort) information into useful order, such as a telephone directory.