Coding activity
Data Structures Unplugged
Sort and organize! Practice putting things in order, making lists, and grouping items. These are the building blocks of how computers store information.
Materials and setup
- cups
- tape
- small objects
- paper
- pencil
- index cards
How this changes by age
Pre-K (ages 3–4)
Sort and organize! Practice putting things in order, making lists, and grouping items. These are the building blocks of how computers store information.
Steps
- Sort a pile of mixed toys by type: cars together, animals together, blocks together.
- Put 5 objects in order: from smallest to biggest, shortest to tallest, or lightest to heaviest.
- Make a list: draw pictures of 5 things you want to do today. Do them in order - that's a list!
- Play matching: lay out 5 cups with a picture taped to each. Under each cup, hide the matching toy.
- Talk about it: computers sort and organize information, just like you sorted your toys!
- Tell a grown-up one thing that surprised you.
Learning objectives
- Sort objects by attributes into groups
- Arrange items in ordered sequences
- Understand that organizing information is a fundamental concept
Kindergarten (ages 5–6)
Explore how computers organize data through hands-on activities: lists, stacks, and queues using real objects.
Steps
- Learn about LISTS: write a grocery list. Each item has a position (1st, 2nd, 3rd). You can add items or remove items.
- Learn about STACKS: stack books. You can only add to the top and remove from the top. (Like a stack of plates!)
- Learn about QUEUES: line up toys. First in line gets to go first. New toys join at the back. (Like a line at a store!)
- Play a game: use a stack of cards. Only look at the top card. To get to a card in the middle, you must remove all cards above it.
- Draw pictures showing: a list (numbered items), a stack (pile), and a queue (line).
- Tell a grown-up one thing that surprised you.
Learning objectives
- Understand lists as ordered collections with positions
- Distinguish between stacks (last in, first out) and queues (first in, first out)
- Connect data organization to everyday experiences
Early elementary (ages 6–8)
Study data structures through physical activities: arrays, dictionaries/maps, and trees. Understand how computers store and retrieve information efficiently.
Steps
- Build an ARRAY: tape 10 numbered cups to a board (index 0-9). Place an object in each cup. Access items by number.
- Build a DICTIONARY: create a mini phone book with name-number pairs. Look up a name to find their number instantly.
- Build a TREE: draw a family tree or a category tree (Animals > Mammals > Dogs > Poodle).
- Search challenge: hide a card in the array. Method 1: check each cup one by one (linear search). Method 2: binary search (if sorted, start in the middle).
- Compare: which search method is faster? Count how many cups you checked with each method.
- Create a poster showing 3 data structures, how they work, and when each is useful.
- In one sentence, tell a parent or sibling what surprised you today.
Learning objectives
- Understand arrays, dictionaries, and trees as data structures
- Compare linear search and binary search efficiency
- Apply data structure concepts to real-world organization problems
Upper elementary (ages 8–10)
Explore advanced data structures: hash tables, graphs, and databases. Analyze how data structure choice affects program performance.
Steps
- Study HASH TABLES: create a system where you can look up any student's locker by running their name through a 'hash function' (e.g., first letter = section).
- Study GRAPHS: map your neighborhood as a graph with nodes (locations) and edges (paths between them). Find the shortest route between two places.
- Design a simple DATABASE: organize information about 10 books into a table with columns (title, author, genre, rating, pages).
- Query your database: 'Find all books by genre = fantasy' or 'Sort by rating, highest first.'
- Analyze efficiency: compare looking up a phone number in an unsorted list vs. a sorted list vs. a hash table. Which is fastest and why?
- Create a presentation: explain 3 data structures, their real-world applications, and when each is the best choice.
- In one sentence, tell a parent or sibling what surprised you today.
Learning objectives
- Understand hash tables, graphs, and databases conceptually
- Analyze how data structure choice affects search efficiency
- Apply data structure concepts to solve real-world organization problems
Safety and evidence note
Read the full activity before beginning. An adult should supervise tools, heat, food, outdoor work, movement, and experiments as appropriate. Completion records that the activity was done; the child’s explanation, work sample, photo, or demonstration is stronger evidence of learning than a completion check alone.
Related coding activities
AI Explorers
Train a pretend 'robot brain'! Show it 5 cat pictures and 5 dog pictures, then test if it can guess a new one.
Algorithm Art
Follow step-by-step drawing instructions to create a picture. The instructions are your algorithm! Each step adds one shape or line.
API Restaurant
Play restaurant! The customer tells the waiter what they want, the waiter tells the kitchen, and the kitchen makes it. The waiter is the messenger — just like how computers talk to each other!
App Design Workshop
Design your dream app! Draw what you'd see on a phone screen. What would your app do? What buttons would it have?