Unplugged Algorithms: Sorting and Searching with Human Arrays
If you are looking for an active, highly engaging unplugged activity to help students truly feel the mechanics of algorithms, I want to share a favorite classroom routine: Human Array Sorting and Searching.
Instead of moving data points around a screen or paper array, your students are the array. By turning your classroom into computer memory and letting students act as processors or pointers, abstract computer science concepts like Bubble Sort, Selection Sort, Linear Search, and Binary Search transform into physical, memorable experiences.
π Why Try This?
-
Zero Tech Required: All you need is your physical classroom, some simple printable cue cards (or index cards), and your students.
-
Kinesthetic Learning: Students who struggle with abstract logic often click instantly when they physically have to compare adjacent peers, step backward during a binary split, or hold a [MID] pointer card.
-
Direct Connection to CS Principles: It bridges the gap between everyday sorting (lining up by height) and computer algorithmic thinking (efficiency, step complexity, and comparisons).
π How It Works in Practice
Phase 1: Setting up the Memory (The Line)
-
Have a group of students (e.g., 6 to 10 scholars to start) line up randomly facing the front of the room.
-
Establish a Sort Rule (e.g., Height from top of head to floor, Hair Length, or Birth Day of the month).
-
Introduce a Modifier (e.g., Ascending vs. Descending).
Phase 2: Running the Algorithms
Assign a student or small group to act as The Computer using structured facilitation sheets:
-
Bubble Sort: Students walk pair-by-pair, compare adjacent peers, swap them if they are out of order, log a physical swap card, and drop a π LOCKED badge on the rightmost finalized student after each pass. When zero swaps happen, the computer halts and announces "SORT COMPLETE!"
-
Selection Sort: The computer walks the line looking for the "CURRENT BEST" candidate, swaps them into the active slot, and locks them in one by one.
-
Linear vs. Binary Search: Once sorted, try hunting for a target (e.g., a specific birth day or height). Watch students experience the dramatic efficiency difference between scanning every single person (Linear) versus splitting the line in half with [LEFT], [RIGHT], and [MID] pointers (Binary).
π‘ Teacher Tips & Reflection Prompts
-
Track the Cost: Have students count the physical number of "swaps" or "comparisons" made during Bubble Sort vs. Selection Sort. Use this as a springboard for discussing algorithmic efficiency (<math-inline class="math-inline math-node selected" data-math="O(n^2)" title="" contenteditable="false">$O(n^2)$</math-inline>).
-
Keep Roles Rotating: Let different students play the "Processor" or hold the pointer cards so everyone gets a turn executing the instructions rather than just being data.
π Grab the Resources!
To make this easy to run tomorrow, I put together a set of portrait-formatted Algorithm Facilitation Sheets and printable card decks (Uno-style swap cards, padlock badges, search pointers, and rule cards) that fit standard lamination sleeves. Note: These were created for the meeting and not used in the classroom yet, I would update these before using them again.
Have you tried human array activities in your classroom? What modifications or rules do your students love using? Let's chat in the comments below! π
------------------------------
Stephen Cerruti
San Diego, CA
------------------------------