Activity 01
Pair Programming: Bubble Sort Implementation
Pairs write bubble sort in pseudocode or Python, test on lists of 5-10 numbers, and log swaps per pass. Switch roles midway. Compare results against a sorted list to spot early termination.
Analyze the number of comparisons and swaps required by Bubble Sort for a nearly sorted list.
Facilitation TipDuring Pair Programming: Bubble Sort Implementation, circulate and ask pairs to verbalize their swap decisions step-by-step to catch off-by-one errors early.
What to look forProvide students with a small, unsorted list of numbers (e.g., 5 elements). Ask them to write down the number of comparisons and swaps required by Bubble Sort to sort this list. Then, ask them to identify the best-case input for Insertion Sort and explain why.