Code with Chompers
  • ⚙️ Settings
    • Increase Text Size
    • Decrease Text Size
    • Toggle High Contrast Mode
    • Toggle Dark Mode
    • Reset Settings
  • Outreach Guide
  • K-6 Activities
  • Middle School Outreach
  • High School Outreach
  • About

On this page

  • Description
  • Time Required
  • Materials Required
  • Steps to Conduct the Activity
    • The Sorting Methods
    • Difficulty Breakdown
  • Discussion & Reflection
    • Answers on Which Algorithm is Usually Faster
  • Wrap-Up
  • Learning Outcomes

Activity 3: Different Ways a Computer Sorts

Teaching students about sorting algorithms through hands-on activities.

Grade: 1
Grade: 2
Grade: 3
Grade: 4
Grade: 5
Grade: 6
Time: 30 Minutes

Description

In this activity, students will learn about sorting methods by arranging numbered paper strips in order using the different approaches a computer can take.

Time Required

  • Estimated Time: 30-45 minutes

Materials Required

  • Paper pieces labelled 1-10
  • Notebook & pen

Steps to Conduct the Activity

The Sorting Methods

Bubble Sorting

Takes two adjacent pieces and compares them together, arranging them by swapping if they are in the wrong order.

Set-Up: - Lay out the numbered paper strips in a random order. - Compare each pair of adjacent strips and swap them if they are in the wrong order. - Repeat this process until the strips are sorted.

Reference video: Bubble Sort Algorithm

Selection Sorting

Repeatedly finds the smallest item in the unsorted part and moves it to the end of the sorted part.

Set-Up: - Lay out the numbered paper strips in a random order. - Find the smallest number among all the strips and move it to the first position. - Find the next smallest number from the remaining strips and place it next to the first. - Repeat until all strips are sorted.

Reference video: Selection Sort Algorithm

Insertion Sorting

Involves sorting one item at a time by comparing each new item with the items already sorted and inserting it in the correct position.

Set-Up: - Lay out the numbered paper strips in a random order. - Start with the second strip and compare it to the first. Insert it in the correct position (before or after the first strip). - Take the third strip and compare it to the already sorted strips, inserting it in the correct position. - Repeat the process until all strips are sorted.

Reference video: Insertion Sort Algorithm

Difficulty Breakdown

Introduction

  • Interact with students and ask why they think having things sorted and arranged can be useful.
  • Explain the three different sorting methods we will be using: Bubble Sort, Selection Sort, and Insertion Sort.

Beginner

  • Only use the paper strips labeled 1-5.
  • Run through each of the sorting methods at least once.
  • 🔍 Focus Skills: computational thinking, problem-solving

Intermediate

  • Use all paper strips.
  • Run through each of the sorting methods at least once.
  • 🔍 Focus Skills: computational thinking, problem-solving

Discussion & Reflection

After the activity has been completed, gather the class for a quick debrief. We can ask:

  • Which method took them the least amount of time to complete?
  • If the answers vary, ask them why they felt that way.

Answers on Which Algorithm is Usually Faster

  • Bubble Sort: Slow because it has to compare and swap a lot.
  • Selection Sort: A little better than bubble sort but still has to make many comparisons.
  • Insertion Sort: Often the fastest of the three for small lists because it finds the right spot for each item without many unnecessary moves.

Wrap-Up

Participating in this activity will enhance students’ computational thinking. The added visual and hands-on application of the paper slips will help students undertsand the concepts of sorting and improve their understanding of coding efficiency.

Learning Outcomes

By the end of this activity, students should:

  • Understand the basic concepts of sorting and why it is useful.
  • Learn how to perform Bubble Sort, Selection Sort, and Insertion Sort.
  • Recognize the differences in efficiency between the three sorting methods.
Back to top

Footer Image