Activity 01
Pair Programming: Efficiency Timer
Pairs write linear and binary search functions in Python, test on arrays from 10 to 10,000 elements, and log execution times. They plot graphs using matplotlib to compare growth rates. Pairs present findings on best uses for each algorithm.
Differentiate between linear search and binary search in terms of their prerequisites and efficiency.
Facilitation TipDuring Pair Programming: Efficiency Timer, ask pairs to swap roles every two minutes so both students experience timing and code adjustments directly.
What to look forProvide students with three scenarios: 1) A large, sorted list of student IDs. 2) A frequently changing list of online user sessions. 3) A small, unsorted list of product names. Ask students to write down the most appropriate search algorithm for each scenario and a one-sentence justification.