Skip to content
Computer Science · Grade 9

Active learning ideas

List Manipulation and Algorithms

Active learning works for list manipulation because these algorithms involve clear, observable steps that students can trace with their hands and eyes. Watching a list change in real time during a sorting race or feeling the slow crawl of a linear search helps students internalize why some methods work better than others.

Ontario Curriculum ExpectationsCS.HS.AP.9CS.HS.CT.10
25–50 minPairs → Whole Class4 activities

Activity 01

Problem-Based Learning30 min · Pairs

Pair Programming: Bubble Sort Challenge

Pairs receive a list of 10-20 unsorted numbers and write a bubble sort function. They add print statements to count swaps, then test on larger lists. Pairs share swap counts and discuss improvements.

Compare different algorithms for searching or sorting elements within a list.

Facilitation TipDuring the Pair Programming challenge, circulate to listen for students describing the swap logic out loud, as verbalizing steps reveals gaps in understanding.

What to look forPresent students with a small, unsorted list of numbers and ask them to trace the steps of a linear search to find a specific number. Then, provide a sorted version of the same list and ask them to trace the steps of a binary search for the same number, noting the difference in steps.

AnalyzeEvaluateCreateDecision-MakingSelf-ManagementRelationship Skills
Generate Complete Lesson

Activity 02

Problem-Based Learning45 min · Small Groups

Small Groups: Search Algorithm Race

Groups implement linear search and binary search functions. Provide sorted and unsorted lists; time how long each takes to find targets. Groups graph results to compare efficiencies.

Design a program that performs multiple manipulations on a list to achieve a specific outcome.

Facilitation TipFor the Search Algorithm Race, provide identical unsorted and sorted lists to each group so teams compare performance directly.

What to look forAsk students to write a short Python function that takes a list of integers and returns a new list containing only the even numbers, sorted in ascending order. This assesses their ability to combine multiple list operations.

AnalyzeEvaluateCreateDecision-MakingSelf-ManagementRelationship Skills
Generate Complete Lesson

Activity 03

Problem-Based Learning25 min · Whole Class

Whole Class: List Manipulation Relay

Divide class into teams. Project an empty list; each student adds one line of code (append, sort, search) toward a goal like finding the top score. Teams vote on best sequence.

Evaluate the efficiency of various list manipulation techniques.

Facilitation TipIn the List Manipulation Relay, place the list cards in a visible spot so students see the list evolve with each step, reinforcing sequence memory.

What to look forFacilitate a class discussion comparing Bubble Sort and Insertion Sort. Ask students: 'Under what conditions might one of these sorting algorithms be significantly more efficient than the other? Provide a specific example.'

AnalyzeEvaluateCreateDecision-MakingSelf-ManagementRelationship Skills
Generate Complete Lesson

Activity 04

Problem-Based Learning50 min · Individual

Individual: Custom List Manager

Students design a program for a to-do list: add tasks, remove completed ones, sort by priority, search by keyword. Test with sample data and note operation counts.

Compare different algorithms for searching or sorting elements within a list.

What to look forPresent students with a small, unsorted list of numbers and ask them to trace the steps of a linear search to find a specific number. Then, provide a sorted version of the same list and ask them to trace the steps of a binary search for the same number, noting the difference in steps.

AnalyzeEvaluateCreateDecision-MakingSelf-ManagementRelationship Skills
Generate Complete Lesson

A few notes on teaching this unit

Experienced teachers approach this topic by letting students experience failure firsthand, then guiding them to see the patterns that reduce it. Avoid rushing to the algorithm’s efficiency; instead, have students count steps, swap roles, and explain to peers. Research shows that when students time their own sorts, they internalize quadratic growth faster than any lecture.

Successful learning looks like students confidently choosing the right tool for a task, timing their algorithms, and explaining why one method outperforms another. They should also recognize when a method fails and revise their approach, showing adaptability with lists and searches.


Watch Out for These Misconceptions

  • During Pair Programming: Bubble Sort Challenge, watch for students assuming bubble sort is always the fastest because it is the first method they learn.

    During the challenge, have pairs time bubble sort on lists of 10, 50, and 100 items, then compare results in a class chart to highlight its quadratic growth.

  • During Small Groups: Search Algorithm Race, watch for students applying binary search to an unsorted list and expecting success.

    During the race, provide unsorted lists first and watch for the moment teams realize they must sort before searching; use this failure to prompt a class discussion on prerequisites.

  • During Whole Class: List Manipulation Relay, watch for students assuming all searches must check every element.

    During the relay, have students count comparisons for linear and binary searches on the same list and share totals to show how binary search skips elements.


Methods used in this brief