Sorting Algorithms

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)

Videos

Photos

  • Supplies used for the sorting algorithm activities

 

Related Resources

  • 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.

 

  • 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

 

 

 

 

Curriculum Links

Great Principles of Computer Science [info]
  • Computation
ACM K12 Curriculum [info]
  • 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.
New Zealand Curriculum [info]
  • Technology Level 1: Brief Development
    • Describe the outcome they are developing and identify the attributes it should have, taking account of the need or opportunity
  • Technology Level 1: Outcome Development and Evaluation
    • Investigate a context to communicate potential outcomes. Evaluate these against attributes; select and develop an outcome.
  • Technology Level 1: Planning for Practice
    • Outline a general plan to support the development of an outcome, identifying appropriate steps and resources