← Courses

CS 210 · 4 credits

Course Outline

Data Structures

Learn how programs organize data and why that choice decides speed. You will count steps to build Big-O intuition, then implement and use arrays, strings, linked lists, stacks, queues, hash tables, trees, heaps, and graphs in Python, finishing with a decision framework for picking the right structure in interviews and real code.

What you will learn

  • Estimate the running time of code with Big-O by counting steps, and explain O(1), O(n), O(log n), and O(n²) growth
  • Explain how arrays, dynamic arrays, and strings sit in memory and predict which operations are cheap or expensive
  • Implement linked lists, stacks, queues, a chained hash table, a binary search tree, and graph representations from scratch in Python
  • Use Python's built-in structures (list, dict, set, deque, heapq) fluently and know the cost of every common operation
  • Apply the core scanning and traversal patterns — binary search, two pointers, sliding window, BFS, and DFS — and explain why each meets its cost bound
  • Choose the right data structure for a problem by naming the operations it must make fast

Course outline

Unit 1Why Data Structures, and Big-O from Zero

  • 1-1Same Data, Different Shapes3 checks · 10 min
  • 1-2Counting Steps: O(1), O(n), O(n²)4 checks · 12 min
  • 1-3O(log n): The Power of Halving4 checks · 12 min

Unit 2Arrays and Dynamic Arrays

  • 2-1Arrays in Memory: Why Indexing Is O(1)5 checks · 12 min
  • 2-2Dynamic Arrays: How append Stays Cheap4 checks · 13 min
  • 2-3Insert, Delete, and the Cost Table3 checks · 11 min

Unit 3Strings as a Structure

  • 3-1Strings Are Immutable Arrays5 checks · 11 min
  • 3-2String Patterns: Two Pointers and Counting4 checks · 12 min
  • 3-3The Sliding Window4 checks · 13 min

Unit 4Linked Lists: Nodes and Pointers

  • 4-1Nodes and Pointers4 checks · 13 min
  • 4-2Build One: Push, Find, Delete4 checks · 15 min
  • 4-3Singly vs Doubly, and vs Arrays2 checks · 10 min

Unit 5Stacks and Queues

  • 5-1Stacks: Last In, First Out4 checks · 12 min
  • 5-2Queues: First In, First Out4 checks · 11 min
  • 5-3The Frontier: Queues That Explore4 checks · 12 min

Unit 6Hash Tables: How dict and set Work

  • 6-1The Hashing Mental Model4 checks · 13 min
  • 6-2Collisions: Build Your Own Hash Table3 checks · 13 min
  • 6-3dict and set in Practice4 checks · 14 min

Unit 7Trees and Binary Search Trees

  • 7-1Trees: The Vocabulary of Hierarchy4 checks · 12 min
  • 7-2Traversals: Visiting Every Node3 checks · 13 min
  • 7-3Binary Search Trees4 checks · 13 min

Unit 8Heaps and Priority Queues

  • 8-1The Heap: Always Know the Minimum4 checks · 13 min
  • 8-2The Top-K Pattern4 checks · 11 min
  • 8-3Inside the Heap: Sift Up, Sift Down4 checks · 13 min

Unit 9Graphs: Networks of Everything

  • 9-1Graphs and How to Store Them4 checks · 14 min
  • 9-2Seeing the Graph in the Problem4 checks · 13 min
  • 9-3DFS: Going Deep, and Counting Islands4 checks · 13 min

Unit 10Choosing Structures: The Capstone

  • 10-1The Decision Framework4 checks · 11 min
  • 10-2Mixed Drills: Bridging to Algorithms6 checks · 16 min

Practice while you learn

Use Hack University's public online code editor when you want to run code online before committing to the full curriculum. The browser compilers are free for quick syntax checks, exercises, and interview practice in an isolated sandbox environment.