Data Structures from the Ground Up
You look up a contact by name and play songs in a chosen order. The way you store data depends on what you need to do with it. This course explains why data structures exist and when to choose each one.
- Who it is for: You have tried variables, conditions, loops, and functions. No previous study of data structures is required.
- Format: A concept, a small example, and a question with an explanation. Every lesson is free to read.
- Examples: Only standard Python 3 features are used. Read each lesson’s code blocks in order, starting fresh for that lesson.
- Goal: Explain how arrays, stacks, queues, trees, and graphs differ, and choose a structure that supports the operations you need.
Start with the first lesson if the subject is new to you. Predict what the code will do before running it, and try each question before opening its answer.
Lessons
- 01 Data Structures and Operation CostsSeparate the way data is stored from the steps used to process it.
- 02 Arrays and ReferencesUse positions for direct access and learn what it means to share an object.
- 03 Stacks and UndoCheck parentheses using the rule that the last item added leaves first.
- 04 Queues and Arrival OrderDistinguish a first-in, first-out queue from a double-ended deque.
- 05 Linked ListsChange links to the next item instead of shifting stored items.
- 06 Circular and Doubly Linked ListsAdapt links for repeat playback and movement in both directions.
- 07 Trees and TraversalRepresent a hierarchy and choose an order for visiting its nodes.
- 08 Search Trees and BalanceUse value comparisons to choose a direction and see why tree height matters.
- 09 Heaps and PriorityBuild a priority queue that retrieves the most urgent task first.
- 10 Graphs and TraversalRepresent general connections and explore them with BFS and DFS.
- 11 Shortest Paths and Minimum Spanning TreesSeparate cheap travel from connecting an entire network cheaply.
- 12 Ordering Dependencies with Topological SortRepresent prerequisites as a directed graph and find a valid work order.
- 13 Sorting and Comparison RulesTrace insertion sort and compare sorting costs and stability.
- 14 Search, Hashing, and Choosing a StructureCompare binary search and hash tables, then choose structures for a small app.
Looking for a product partner?
Founders, teams, businesses: from problem framing to launch.