← 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 Shapes10 min
  • 1-2Counting Steps: O(1), O(n), O(n²)12 min
  • 1-3O(log n): The Power of Halving12 min

Unit 2Arrays and Dynamic Arrays

  • 2-1Arrays in Memory: Why Indexing Is O(1)12 min
  • 2-2Dynamic Arrays: How append Stays Cheap13 min
  • 2-3Insert, Delete, and the Cost Table11 min

Unit 3Strings as a Structure

  • 3-1Strings Are Immutable Arrays11 min
  • 3-2String Patterns: Two Pointers and Counting12 min
  • 3-3The Sliding Window13 min

Unit 4Linked Lists: Nodes and Pointers

  • 4-1Nodes and Pointers13 min
  • 4-2Build One: Push, Find, Delete15 min
  • 4-3Singly vs Doubly, and vs Arrays10 min

Unit 5Stacks and Queues

  • 5-1Stacks: Last In, First Out12 min
  • 5-2Queues: First In, First Out11 min
  • 5-3The Frontier: Queues That Explore12 min

Unit 6Hash Tables: How dict and set Work

  • 6-1The Hashing Mental Model13 min
  • 6-2Collisions: Build Your Own Hash Table13 min
  • 6-3dict and set in Practice14 min

Unit 7Trees and Binary Search Trees

  • 7-1Trees: The Vocabulary of Hierarchy12 min
  • 7-2Traversals: Visiting Every Node13 min
  • 7-3Binary Search Trees13 min

Unit 8Heaps and Priority Queues

  • 8-1The Heap: Always Know the Minimum13 min
  • 8-2The Top-K Pattern11 min
  • 8-3Inside the Heap: Sift Up, Sift Down13 min

Unit 9Graphs: Networks of Everything

  • 9-1Graphs and How to Store Them14 min
  • 9-2Seeing the Graph in the Problem13 min
  • 9-3DFS: Going Deep, and Counting Islands13 min

Unit 10Choosing Structures: The Capstone

  • 10-1The Decision Framework11 min
  • 10-2Mixed Drills: Bridging to Algorithms16 min

Keep a reference open

The cheatsheets are compact syntax references for the languages, frameworks, and tools this course touches. Keep one in a second tab while you read.