Ch 1 · Thinking Like a Computer Scientist · Data Structures & Algorithms
Topic 1 of 10 in Data Structures & Algorithms — Foundations — 3 lessons.
What Are Data Structures & Algorithms?
Every useful program does two things: it stores information and it processes it. Those two jobs have names.
Big-O: Measuring the Cost
When we ask "is this fast?", we do not mean seconds on your laptop — we mean: as the input grows, how fast does the work grow? That is Big-O notation.
Why O(n²) Will Hurt You
A loop inside a loop usually means O(n²) — and that scales badly. With 1,000 items that is 1,000,000 steps; with 1,000,000 items it is a trillion. The code below finds a duplicate two ways so you can feel the difference.
All topics in Data Structures & Algorithms Beginner
- Thinking Like a Computer Scientist
- Arrays & Lists — The Workhorse
- Stacks — Last In, First Out
- Queues — First In, First Out
- Linked Lists — Nodes on a Chain
- Searching — Finding the Needle
- Sorting — Putting Things in Order
- Recursion — Functions That Call Themselves
- Hash Tables — Instant Lookups
- Mini-Projects & Practice