Activity 01
Pair Programming: Array vs List Timer
Pairs implement an array and a list to store 20 random numbers, then perform 10 append and remove operations on each. Use a stopwatch to record times and graph results. Discuss which structure wins for speed and flexibility.
Compare the advantages and disadvantages of fixed-size arrays versus dynamic lists.
Facilitation TipDuring the Pair Programming: Array vs List Timer activity, circulate and ask pairs to explain why their chosen structure performed better in the timed trials.
What to look forProvide students with a small code snippet that manipulates an array (e.g., `myArray = [10, 20, 30]; myArray.remove(1); myArray.insert(0, 5);`). Ask them to write down the final state of the array and explain why each step resulted in that state.