Skip to content
Computer Science · Grade 12

Active learning ideas

Algorithm Design Strategies

Algorithm design strategies can feel abstract to students until they experience the trade-offs firsthand. Active learning lets them compare methods in real time, so they see why brute force works for small inputs yet fails on large ones, or why greedy steps sometimes backfire. This approach builds intuition for matching strategies to problems, which is essential for solving unfamiliar challenges.

Ontario Curriculum ExpectationsCS.AA.13CS.P.23
25–45 minPairs → Whole Class4 activities

Activity 01

Project-Based Learning35 min · Pairs

Pairs Duel: Brute Force vs Divide and Conquer

Pairs implement both strategies for finding maximum subarray sum. First, code brute force (nested loops), then divide and conquer (recursive splits). Test on sample arrays, record runtimes, and graph results for class shareout.

Compare the strengths and weaknesses of different algorithm design strategies.

Facilitation TipDuring Pairs Duel, assign identical small problems to both partners but specify different strategies (brute force vs divide and conquer) to force direct comparison of code and runtime.

What to look forPresent students with three short problem descriptions (e.g., finding the shortest path in a small graph, sorting a list of numbers, finding all possible combinations of items). Ask them to identify which algorithm design strategy (brute force, divide and conquer, greedy, dynamic programming, backtracking) would be most appropriate for each problem and briefly justify their choice.

ApplyAnalyzeEvaluateCreateSelf-ManagementRelationship SkillsDecision-Making
Generate Complete Lesson

Activity 02

Project-Based Learning45 min · Small Groups

Small Groups: Greedy Coin Change Challenge

Groups design a greedy algorithm for minimum coins using Canadian denominations. Test cases with suboptimal results, then discuss limitations. Modify for dynamic programming and compare outputs.

Explain how to select the most appropriate algorithm design strategy for a given problem.

Facilitation TipFor the Greedy Coin Change Challenge, provide real coins or printed images so students can physically manipulate amounts to see how greedy choices fail in certain cases.

What to look forFacilitate a class discussion using the prompt: 'Imagine you are tasked with designing an algorithm to find the optimal seating arrangement for a large conference to minimize travel time for attendees. Which algorithm design strategy would you lean towards, and why? What are the potential pitfalls of your chosen strategy, and how might you mitigate them?'

ApplyAnalyzeEvaluateCreateSelf-ManagementRelationship SkillsDecision-Making
Generate Complete Lesson

Activity 03

Project-Based Learning30 min · Whole Class

Whole Class: Backtracking Strategy Vote

Project a Sudoku puzzle. Class proposes backtracking steps live on shared code. Vote on path prunings, simulate fills, and time solutions to see efficiency gains.

Design an algorithm for a complex problem, justifying the chosen design strategy.

Facilitation TipWhen running the Backtracking Strategy Vote, have students physically move to corners of the room based on their strategy choice to make thinking visible and spark debate.

What to look forAssign students to work in pairs to design a brute force algorithm for a simple problem (e.g., finding all pairs of numbers in a list that sum to a target). Then, have them swap their code and a problem description with another pair. Each pair must critique the other's code for clarity and correctness, and suggest if a more efficient strategy could be applied and why.

ApplyAnalyzeEvaluateCreateSelf-ManagementRelationship SkillsDecision-Making
Generate Complete Lesson

Activity 04

Project-Based Learning25 min · Individual

Individual: Paradigm Picker Worksheet

Students get five problems (e.g., traveling salesman, longest common subsequence). Select and sketch best strategy with justification. Share one via gallery walk for feedback.

Compare the strengths and weaknesses of different algorithm design strategies.

Facilitation TipFor the Paradigm Picker Worksheet, require students to include a time complexity estimate for each problem to reinforce the connection between strategy and performance.

What to look forPresent students with three short problem descriptions (e.g., finding the shortest path in a small graph, sorting a list of numbers, finding all possible combinations of items). Ask them to identify which algorithm design strategy (brute force, divide and conquer, greedy, dynamic programming, backtracking) would be most appropriate for each problem and briefly justify their choice.

ApplyAnalyzeEvaluateCreateSelf-ManagementRelationship SkillsDecision-Making
Generate Complete Lesson

A few notes on teaching this unit

Teach this topic by grounding each strategy in a concrete example students can relate to, like sorting a deck of cards for divide and conquer or planning a road trip for greedy approaches. Avoid lecturing on abstract definitions; instead, let students discover patterns through structured comparisons. Research shows that when students articulate why a method works or fails, their retention and transfer improve significantly.

Students will confidently select and justify algorithm design strategies for given problems, explaining when each excels or falls short. They will also recognize common pitfalls, such as assuming greediness always yields optimal results or overlooking memoization in dynamic programming. By the end, they should articulate trade-offs between time, space, and correctness.


Watch Out for These Misconceptions

  • During Greedy Coin Change Challenge, watch for students assuming the largest coins first will always yield the correct change.

    Have groups test their greedy solutions against edge cases (e.g., 30 cents with coins 25, 10, 1). After discrepancies are found, guide them to compare greedy code with a dynamic programming solution they code next.

  • During Paradigm Picker Worksheet, watch for students equating dynamic programming with simple recursion.

    Require students to include memoization tables in their worksheet solutions. During peer review, have them trace the same problem twice: once recursively and once with a filled memoization table, timing each version on a shared whiteboard.

  • During Pairs Duel, watch for students dismissing brute force as useless for any practical scenario.

    After the activity, run a whole-class demo where students time brute force and divide and conquer solutions on datasets of increasing size, highlighting how brute force verifies correctness on small inputs while efficient methods scale.


Methods used in this brief