Activity 01
Think-Pair-Share: Classify the Growth
Display five code snippets: a single loop, a nested loop, a binary search, a constant-time lookup, and a triple nested loop. Students individually classify each as O(1), O(log n), O(n), O(n log n), or O(n²). Pairs compare and resolve disagreements, then share reasoning with the class. Keeps focus on why the classification holds, not just the answer.
Explain the significance of Big O notation in comparing algorithm efficiency.
Facilitation TipDuring Think-Pair-Share: Classify the Growth, circulate and listen for students who use vague language like 'slower' or 'faster' without specifying input size, then prompt them to quantify the growth.
What to look forProvide students with pseudocode snippets for simple algorithms (e.g., finding the maximum value in a list, checking if an element exists in a sorted list). Ask them to write down the Big O notation for each algorithm and justify their answer by identifying the dominant operation.