Unit 1 · Lesson 112 minAcademic review pending

It is not what you store, it is how

CS105ES taught you to store values. This course asks a different question: given the same values, does the way you arrange them change how fast you can use them? The answer is yes, always.

Choose explanation

After this lesson

You should be able to

  • Explain why the same data can behave very differently depending on how it is arranged.
  • Describe what each of the five units adds, and how it builds on CS105ES.
  • Recognise which unit to return to when a specific kind of problem shows up later.
01

A messy chat and a searchable one hold the same messages

Open a WhatsApp chat you have never organised and try to find one photo someone sent three months ago. You scroll, and scroll, and scroll — checking every single message in order, because there is no other way. That scrolling is exactly what CS105ES's arrays give you: a row of values you can only search one by one, from the start, every time.

Now think about a folder of starred messages, or a search bar that jumps straight to what you typed. Same underlying messages, same phone, same memory — but a different arrangement turns a minutes-long search into a one-second one. Nothing about the data itself changed. Only the structure around it did. That is the entire subject of this course.

02

The five units, as one story

Unit 1 starts with linear structures — lists, stacks, and queues — where the arrangement is a simple line, but which end you are allowed to touch changes everything you can build with it. Unit 2 moves to trees, where data branches instead of lining up, and search stops being one-by-one and starts being one-of-two-directions at each step. Unit 3 pushes trees further, into multi-way trees and heaps, plus two searches that outrun the linear scan from CS105ES entirely.

Unit 4 covers graphs — networks where anything can connect to anything, like a friend circle rather than a family tree — and rounds out sorting beyond what CS105ES covered. Unit 5 closes with hashing, the closest thing to instant lookup you will meet in this course, and file organisation, so data survives after the program ends. Each unit answers a version of the same question this lesson opened with: given this data and this problem, what arrangement makes it fast?

03

Why this is not just "more C"

You already know the C you need — variables, pointers, functions, structures. This course reuses all of it, but the question changes. CS105ES asked "how do I write code that does X." This course asks "given several correct ways to arrange my data, which one is actually fast enough for what I need," and that question does not have one universal answer — it depends on what you do most often: insert, search, or delete.

Every unit from here gives you one more option for that toolbox, plus the reasoning to know when to reach for it. By the end, seeing a new problem will make you ask "what shape does this data naturally have" before you write a single line — the same discipline CS105ES built around algorithms, now aimed at structure.

Try it yourself

List three things you organise in daily life (a cupboard, a phone's apps, a class timetable). For each, name what you optimise for — quick access, easy adding, or easy removal — and describe the arrangement you actually use.

Need a hint?

A cupboard optimised for quick access to today's clothes looks different from one optimised for storing out-of-season clothes compactly. There is no single best arrangement, only one best for a specific need.

Check the worked solution

A phone's home screen optimises for quick access to a few apps (front and center) at the cost of everything else being one tap further away. A class timetable optimises for quick lookup by day and time, not by subject name. Neither choice is wrong — each is a data structure decision made for a specific most-common use, exactly the trade-off this whole course teaches you to make deliberately instead of by accident.

Quick check

Why does this course spend five units on arrangement when CS105ES already covered arrays?

Select an answer to check your thinking.

Why this lesson exists

Syllabus mapping

Basic Terminology, Classification of Data Structures, Operation on Data Structures · abstract data types, selecting a Data Structure

Maps to course outcomes CO1, CO2.