Activity 01
Collaborative Problem-Solving: Algorithm Timing Race
Students implement linear search and binary search in Python, test on sorted arrays from size 10 to 10,000, and log execution times. Groups plot data points to visualize O(n) versus O(log n) growth. Conclude with a class share-out on patterns observed.
Explain the purpose of Big O notation in comparing algorithms.
Facilitation TipDuring the Algorithm Timing Race, circulate to ensure groups run tests on input sizes that clearly show scaling differences, like 100, 1,000, and 10,000 elements.
What to look forPresent students with short pseudocode snippets or descriptions of algorithms (e.g., iterating through a list once, nested loops processing a 2D array). Ask them to write down the Big O notation for each and justify their answer by identifying the dominant operation.