Skip to content
Computing · Year 7

Active learning ideas

Efficiency and Optimisation

Active learning is crucial for understanding algorithm efficiency. By engaging directly with different algorithms, students move beyond theoretical definitions to practical experience. This hands-on approach helps solidify the idea that there's often more than one way to solve a problem, and performance matters.

National Curriculum Attainment TargetsKS3: Computing - Algorithms
25–40 minPairs → Whole Class3 activities

Activity 01

Problem-Based Learning30 min · Small Groups

Algorithm Race: Sorting Methods

Students are given two different sorting algorithms (e.g., bubble sort vs. selection sort) to sort a small set of physical cards. They time each method and record the number of swaps, discussing which was faster and why.

Compare two different algorithms designed to solve the same problem, assessing their efficiency.

Facilitation TipFor the 'Algorithm Race', ensure students understand the 'Problem-Based Learning' mechanic by encouraging them to define their own criteria for 'best' before the race begins, not just speed.

AnalyzeEvaluateCreateDecision-MakingSelf-ManagementRelationship Skills
Generate Complete Lesson

Activity 02

Problem-Based Learning25 min · Pairs

Code Tracing: Loop Optimisation

Provide students with a simple program containing a nested loop that performs a redundant calculation. Have them trace the execution step-by-step, identify the inefficiency, and then rewrite the code to perform the calculation only once.

Design an improved version of a given algorithm to make it more efficient.

Facilitation TipWhen students are tracing code in 'Code Tracing', guide them using the 'Decision Matrix' approach by prompting them to create a simple matrix comparing the original loop's steps against the refactored loop's steps.

AnalyzeEvaluateCreateDecision-MakingSelf-ManagementRelationship Skills
Generate Complete Lesson

Activity 03

Problem-Based Learning40 min · Small Groups

Algorithm Design Challenge

Present a simple problem, like finding the shortest path on a small grid. Students work in groups to design two different algorithms to solve it, then present their approaches and justify which they believe is more efficient.

Justify the trade-offs between algorithm complexity and execution speed.

Facilitation TipDuring the 'Algorithm Design Challenge', facilitate 'Problem-Based Learning' by allowing groups to present multiple valid solutions and justify their design choices, embracing ambiguity.

AnalyzeEvaluateCreateDecision-MakingSelf-ManagementRelationship Skills
Generate Complete Lesson

A few notes on teaching this unit

Approach this topic by framing efficiency as a key characteristic of a 'good' algorithm, alongside correctness. Avoid simply presenting formulas; instead, use comparative activities to build intuition. Research shows that concrete examples and opportunities for student-led comparison are most effective for developing this understanding.

Students will be able to articulate why comparing algorithms based on performance, not just correctness, is important. They will demonstrate an understanding that input size significantly impacts an algorithm's efficiency and be able to identify potential areas for optimisation in simple code.


Watch Out for These Misconceptions

  • During the 'Algorithm Race', students may stop at the first sorting algorithm that correctly orders the data. Help them see that correctness is only one part of a good algorithm by highlighting the performance differences observed during the race.

    Redirect students to compare the number of swaps or comparisons each algorithm made during the 'Algorithm Race'. Use this data to discuss why one algorithm might be preferred over another, even if both yield the correct result.

  • During 'Code Tracing: Loop Optimisation', students might believe that simplifying code for efficiency always makes it harder to read. Demonstrate how removing redundant calculations in the nested loop can actually improve clarity.

    After students refactor the code in 'Code Tracing', have them explain in their own words why the optimised version is clearer. Ask them to compare the 'before' and 'after' code side-by-side, focusing on the reduction of repeated steps.


Methods used in this brief