Activity 01
Pairs Coding: Sort Comparisons
Pairs implement bubble sort and quicksort in Python. Test on arrays from 100 to 10,000 elements, record execution times using time module. Graph results and explain why one scales better.
Explain the difference between time complexity and space complexity.
Facilitation TipDuring Pairs Coding: Sort Comparisons, circulate and ask each pair to time their sorts on arrays of size 1,000, 10,000, and 100,000 to reveal quadratic slowdowns.
What to look forPresent students with short pseudocode snippets for simple operations like finding the maximum element in a list or checking if an element exists. Ask them to write down the Big O time complexity for each snippet and justify their answer in one sentence.