Skip to content

Bubble Sort and Insertion SortActivities & Teaching Strategies

Active learning works for Bubble Sort and Insertion Sort because these algorithms rely on clear, repeatable steps that students can physically act out and visualize. Moving from abstract lists to hands-on manipulations helps students internalize the iterative nature of sorting, while pair programming lets them test their understanding by translating steps into code.

Year 10Computing4 activities20 min40 min

Learning Objectives

  1. 1Compare the number of comparisons and swaps required by Bubble Sort and Insertion Sort for a given unsorted list.
  2. 2Explain the step-by-step process of how Bubble Sort arranges elements in ascending order.
  3. 3Design a scenario where Insertion Sort's adaptive nature provides a performance advantage over Bubble Sort.
  4. 4Implement Bubble Sort and Insertion Sort algorithms in a chosen programming language.
  5. 5Analyze the time complexity of both Bubble Sort and Insertion Sort in their worst-case scenarios.

Want a complete lesson plan with these objectives? Generate a Mission

20 min·Pairs

Unplugged Activity: Physical Bubble Sort

Provide students with shuffled number cards. Instruct pairs to perform passes, swapping adjacent cards aloud while counting comparisons. After three passes, discuss how the largest cards reach the end. Extend to trace a small array on paper.

Prepare & details

Compare the efficiency and simplicity of Bubble Sort and Insertion Sort.

Facilitation Tip: During the Physical Bubble Sort, walk the room and pause groups to ask them to count swaps aloud, ensuring they connect each swap to the algorithm’s requirement.

Setup: Open space or rearranged desks for scenario staging

Materials: Character cards with backstory and goals, Scenario briefing sheet

ApplyAnalyzeEvaluateSocial AwarenessSelf-Awareness
30 min·Small Groups

Stations Rotation: Insertion Sort Practice

Set up stations with arrays on cards: nearly sorted, reverse sorted, random. Small groups insert elements step-by-step, recording shifts. Rotate stations, then share efficiency observations as a class.

Prepare & details

Explain the step-by-step process of how Bubble Sort arranges elements.

Facilitation Tip: For the Station Rotation, set a timer so students rotate only after completing their current card sort, preventing rushed work and encouraging careful shifts.

Setup: Tables/desks arranged in 4-6 distinct stations around room

Materials: Station instruction cards, Different materials per station, Rotation timer

RememberUnderstandApplyAnalyzeSelf-ManagementRelationship Skills
40 min·Pairs

Pair Programming Challenge: Implement and Compare

Pairs code both algorithms in Python or pseudocode for given arrays. Time runs on datasets of varying sizes. Graph results and debate which performs best for specific cases.

Prepare & details

Design a scenario where Insertion Sort might be more efficient than other simple sorts.

Facilitation Tip: In the Pair Programming Challenge, require students to run their code on the same list before swapping partners, so they experience the algorithms’ outputs firsthand.

Setup: Open space or rearranged desks for scenario staging

Materials: Character cards with backstory and goals, Scenario briefing sheet

ApplyAnalyzeEvaluateSocial AwarenessSelf-Awareness
25 min·Individual

Scenario Design: Real-World Application

Individually brainstorm scenarios like library book sorting where one algorithm fits better. Pairs refine and present, justifying with step traces. Class votes and discusses.

Prepare & details

Compare the efficiency and simplicity of Bubble Sort and Insertion Sort.

Setup: Open space or rearranged desks for scenario staging

Materials: Character cards with backstory and goals, Scenario briefing sheet

ApplyAnalyzeEvaluateSocial AwarenessSelf-Awareness

Teaching This Topic

Teach these algorithms by starting with the unplugged activities to build intuition, then move to code to reinforce precision. Avoid rushing to pseudocode; instead, have students annotate their own sorting traces to make the process explicit. Research shows that students grasp iteration better when they physically experience the ‘passes’ of Bubble Sort and the ‘shifts’ of Insertion Sort before coding.

What to Expect

Successful learning looks like students confidently tracing both algorithms step-by-step on paper and explaining why each comparison or shift happens. They should be able to compare the two algorithms’ efficiencies in small lists, justifying their choices with evidence from their own sorting attempts.

These activities are a starting point. A full mission is the experience.

  • Complete facilitation script with teacher dialogue
  • Printable student materials, ready for class
  • Differentiation strategies for every learner
Generate a Mission

Watch Out for These Misconceptions

Common MisconceptionDuring Physical Bubble Sort, watch for students who stop after one pass and declare the list sorted.

What to Teach Instead

Pause the group after the first pass and ask them to recount swaps aloud, then challenge them to run another pass until no swaps occur, using their own observation to correct the misconception.

Common MisconceptionDuring Station Rotation: Insertion Sort Practice, watch for students who shift every element in the list regardless of order.

What to Teach Instead

Have students pause and explain why they shifted a specific element, using the rod or card model to visualize the minimal shifts needed for nearly sorted lists.

Common MisconceptionDuring Pair Programming Challenge: Implement and Compare, watch for students who dismiss these algorithms as useless due to their time complexity.

What to Teach Instead

Prompt them to run their code on small, near-sorted lists and discuss why simplicity can be valuable in practice, using runtime comparisons to shift their perspective.

Assessment Ideas

Quick Check

After Physical Bubble Sort, provide students with a new small list and ask them to trace Bubble Sort and Insertion Sort side by side, showing list states after each key step.

Discussion Prompt

During Station Rotation: Insertion Sort Practice, pose the question: ‘Which algorithm would you choose for a deck with only three cards out of place, and why?’ Have students share their reasoning based on shifts and passes.

Exit Ticket

After Pair Programming Challenge: Implement and Compare, have students write on one half of their exit card the loop condition for Bubble Sort and on the other half the insertion point logic for Insertion Sort, highlighting the key difference in how they process the list.

Extensions & Scaffolding

  • Challenge: Ask students to modify their Insertion Sort implementation to stop early if the list becomes sorted before finishing, then compare runtimes with and without this optimization.
  • Scaffolding: Provide partially completed code for either algorithm, with comments prompting students to fill in comparison or shifting logic.
  • Deeper exploration: Have students research and present a scenario where Bubble Sort’s simplicity outweighs its inefficiency, such as sorting a tiny dataset in a low-power device.

Key Vocabulary

Bubble SortA simple sorting algorithm that repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order. Passes are repeated until the list is sorted.
Insertion SortA simple sorting algorithm that builds the final sorted list one item at a time. It takes each element from the input data and inserts it into its correct position in the already sorted part of the list.
Adjacent elementsTwo elements in a list that are immediately next to each other, sharing a boundary.
SwapAn operation where the values of two variables or elements are exchanged.
PassOne complete iteration through the entire list of elements during the execution of a sorting algorithm like Bubble Sort.

Ready to teach Bubble Sort and Insertion Sort?

Generate a full mission with everything you need

Generate a Mission