Activity 01
Physical Model: Array vs Linked List Operations
Provide index cards as data elements and string as pointers. In small groups, students build an array by placing cards in a row and insert an element in the middle, noting shifts needed. Then reconstruct as a linked list, inserting by linking nodes, and compare effort and steps recorded on worksheets.
How does the way data is stored in memory affect the speed of accessing it?
Facilitation TipDuring the Physical Model activity, have students physically move index cards to simulate array shifts and pointer redirections, so timing differences become visible.
What to look forPresent students with two scenarios: Scenario A involves frequent additions/removals at the beginning of a collection, and Scenario B involves frequent random access to elements. Ask students to identify which data structure, array or linked list, would be more efficient for each scenario and to briefly justify their choice.