CS 150 · Data Structures & Algorithms · 4 Units
Structures Calendar Philosophy
→ CS 150 · Community College · Spring 2025

Data
Structures
&
Algorithms

Arrays. Trees. Graphs. Sorting. These aren't abstract puzzles. They're the tools behind every app, every search engine, every social media feed — and every surveillance system. We learn them by building things with them, for our communities.

16
Weeks
12
Mini-Projects
3
Learning Paths
Real Applications
Course Index
01 Arrays & Dynamic Arrays Linear 02 Linked Lists Linear 03 Stacks & Queues Linear 04 Hash Tables Lookup 05 Binary Trees & BSTs Hierarchical 06 Heaps & Priority Queues Hierarchical 07 Graphs Network 08 Sorting Algorithms Algorithm 09 Search Algorithms Algorithm 10 Dynamic Programming Paradigm 11 Advanced Trees Balanced 12 Big-O & Complexity Analysis
01 — Philosophy

Every data structure is a
design decision about the world

A hash table doesn't just store data — it makes assumptions about what data is "equal." A priority queue doesn't just order items — it defines what "matters most." These are not neutral technical choices. They reflect values, and the people who program them carry those values forward.

This course treats each data structure as a mini-engineering challenge with a real-world application. You won't just implement a linked list. You'll build a music playlist system and ask: what happens when the playlist runs out? Who decides what plays next?

We draw on liberatory pedagogy throughout. The goal isn't to prepare you to pass a whiteboard interview — though you'll be ready for that too. The goal is to give you the tools to build technology that serves your community rather than exploits it.

01
Every structure, one project

No isolated drills. Every data structure is introduced through a real application you build and present.

02
Three depths, same concept

Novice uses the structure as a library. Intermediate builds it from scratch. Advanced analyzes its tradeoffs and extends it.

03
Complexity as story

Big-O is introduced through human stories — "What happens when your city doubles in size?" — before it's introduced as math.

04
The ethics is inside the code

Who does your algorithm hurt when it's slow? Who benefits from a fast lookup? Power is encoded in performance decisions.

02 — Data Structures & Algorithm Projects

Twelve mini-projects.
Zero boring drills.

Click any card to see the three-track project, complexity requirements, and key concepts for that data structure or algorithm.

AccessO(1)
SearchO(n)
Insert (end)O(1) amort.
Insert (mid)O(n)
SpaceO(n)
🌱 Novice
Voting Tally System

Build a class election voting system using Python lists. Add candidates, count votes, announce results. Reflect: how does the order of the array affect who "wins" ties?

🔨 Intermediate
Build ArrayList from Scratch

Implement a dynamic array in Python with manual resizing (double when full). Profile append performance. Plot amortized cost. Show why 2x growth achieves O(1) amortized.

🔬 Advanced
Memory Layout Explorer

Use ctypes to inspect Python list memory layout. Compare row-major vs column-major storage. Benchmark cache performance. Implement a numpy-style stride array with custom indexing.

Index vs value Contiguous memory Amortized O(1) Cache locality
AccessO(n)
PrependO(1)
Insert (mid)O(n)
DeleteO(1)*
SpaceO(n)
🌱 Novice
Music Playlist App

Build a playlist app using Python's deque (which is a doubly linked list). Add songs, skip to next/prev, loop. Reflect: when a playlist "forgets" a song, what's actually happening in memory?

🔨 Intermediate
Build a Doubly Linked List

Implement Node class with prev/next pointers. Build full doubly linked list with insert, delete, search, reverse. Build a browser history system on top of it. Add LRU cache behavior.

🔬 Advanced
Skip List Implementation

Implement a skip list — a probabilistic linked list that achieves O(log n) search. Compare to binary search tree. Prove expected complexity. When would you use this over a BST?

Node pointers O(1) prepend No random access LRU cache Skip list
Push/EnqueueO(1)
Pop/DequeueO(1)
PeekO(1)
SearchO(n)
🌱 Novice
Undo/Redo Editor

Build a simple text editor with undo (stack) and a print queue simulation (queue). Run the classroom printer simulation: who gets printed first? Is FIFO fair? What if some jobs take 10x longer?

🔨 Intermediate
Balanced Brackets Checker

Implement a stack to check balanced parentheses, brackets, and braces in real code files. Extend to check valid HTML. Then implement a call stack simulator that traces recursive function calls.

🔬 Advanced
Monotonic Stack & Sliding Window

Implement the "next greater element" and "largest rectangle in histogram" using a monotonic stack. Build a sliding window max using a deque. Profile space-time tradeoff against brute force.

LIFO / FIFO Call stack Balanced parens Monotonic stack Scheduling fairness
InsertO(1) avg
LookupO(1) avg
DeleteO(1) avg
Worst caseO(n)
SpaceO(n)
🌱 Novice
Student Directory App

Build a student directory using Python dicts. Add, remove, search students by ID. Now try: what if two students have the same ID? Run a "birthday paradox" demo with the class to feel collision probability.

🔨 Intermediate
Build a Hash Table from Scratch

Implement hash table with chaining and open addressing. Write your own hash function. Profile load factor vs performance. Build a word frequency counter on a 10MB text file. Beat Python dict on your custom benchmark.

🔬 Advanced
Bloom Filters & Privacy

Implement a Bloom filter for approximate set membership. Show space vs false positive tradeoff. Apply to a "safe browsing" use case. Then: how do browsers hash URLs to check them without sending them to Google?

Hash functions Collision chaining Load factor Bloom filters Password hashing
BST SearchO(log n) avg
BST InsertO(log n) avg
Worst (skewed)O(n)
TraversalO(n)
🌱 Novice
Family Tree Visualizer

Build a family tree with a visual tool. Navigate ancestor/descendant relationships. Run in-order traversal "by hand" on the board. Connect: how does a file system use a tree? Why is `/home/user` a "path"?

🔨 Intermediate
Book Search BST

Implement a BST to store and search a library of books by ISBN. Write all three traversals. Build a visualization with matplotlib. Show what happens when you insert sorted data — and why trees go bad.

🔬 Advanced
BST → Decision Tree Bridge

Implement BST with all operations. Then implement a simple decision tree classifier that shares the same node structure. Show: every decision tree in ML is a BST with rules instead of numbers. What does that mean for fairness?

BST invariant Tree traversals DFS on trees Height balance ML decision trees
InsertO(log n)
Get Min/MaxO(1)
Remove MinO(log n)
HeapifyO(n)
🌱 Novice
ER Triage Simulator

Simulate an emergency room using Python's heapq. Patients arrive with severity scores. Use a priority queue to always treat the most critical first. Ask: is "most critical first" always fair? Who decides severity?

🔨 Intermediate
Build a Heap from Scratch

Implement a binary heap array in Python. Write sift-up and sift-down. Implement heapsort. Show that heapify is O(n) not O(n log n). Apply to a real-time event scheduler for a community calendar app.

🔬 Advanced
Median Maintenance

Solve the "streaming median" problem using two heaps. Prove it achieves O(log n) per update. Apply to real-time income inequality analysis on a streaming dataset. Connect to Dijkstra's algorithm.

Heap property Sift up/down Heapsort Scheduling Median streaming
BFS/DFSO(V+E)
DijkstraO((V+E)log V)
Adj. List SpaceO(V+E)
Adj. Matrix SpaceO(V²)
🌱 Novice
Six Degrees of Your Campus

Draw a social graph of your class (who knows who from before). Run BFS by hand to find the "six degrees" path. Now: Facebook, Instagram, LinkedIn are all graphs. Who profits from knowing your edges?

🔨 Intermediate
Transit Route Optimizer

Model Bay Area transit as a weighted graph using adjacency lists. Implement BFS, DFS, and Dijkstra. Find the shortest path between two points. Compare to Google Maps. Analyze who gets underserved routes.

🔬 Advanced
Social Network Influence Analysis

Implement PageRank from scratch on a real Twitter/academic citation graph. Detect communities with BFS. Run cycle detection. Show how PageRank amplifies existing power. Read about its use in predictive policing.

Adjacency list/matrix BFS / DFS Dijkstra's algorithm Cycle detection PageRank Social graph ethics
Merge SortO(n log n)
Quick Sort avgO(n log n)
Quick Sort worstO(n²)
Radix SortO(nk)
Lower BoundΩ(n log n)
🌱 Novice
Sorting Race Visualizer

Use a visual sorting simulator (sort.visualized.io). Race bubble sort vs merge sort on 1000 elements. Watch them. Time them. Ask: when does the order you start with change the winner? What's the "worst case" for quicksort?

🔨 Intermediate
Sort the Census

Implement merge sort and quicksort from scratch. Apply to a real Census dataset. Sort by income, by zip code, by race. Profile with timeit. Show that sort stability matters when sorting by multiple keys.

🔬 Advanced
Beat O(n log n): Radix Sort

Implement radix sort on integers and strings. Prove it beats the comparative lower bound. Profile on 10M elements. Show why radix sort isn't always "better." Write a rigorous proof of the comparative lower bound.

Divide and conquer Stability Pivot selection Ω(n log n) lower bound Radix/counting sort
Fibonacci (naive)O(2ⁿ)
Fibonacci (DP)O(n)
KnapsackO(nW)
LCSO(mn)
🌱 Novice
Community Budget Planner

Given a limited community center budget, choose programs to maximize community impact. Solve by hand with a table. This IS the knapsack problem. Discover DP by solving it bottom-up on a whiteboard together.

🔨 Intermediate
Text Diff Tool

Implement Longest Common Subsequence to build a git-diff style tool. Show "edit distance" between two versions of a document. Apply to DNA sequences. Visualize the DP table filling bottom-up.

🔬 Advanced
DP Complexity Analysis Suite

Implement 5 classic DP problems (coin change, longest increasing subseq, word break, matrix chain, edit distance). For each: prove optimal substructure, derive recurrence, analyze complexity. When is DP overkill?

Optimal substructure Overlapping subproblems Memoization Tabulation LCS / edit distance
AVL searchO(log n)
AVL insertO(log n)
Trie searchO(m)
Trie spaceO(ALPHABET·m)
🌱 Novice
Autocomplete Your Language

Build a trie-based autocomplete for a language of your choice using Python dicts. Add words from a corpus in your language. Type a prefix, get suggestions. What happens when your language has different alphabet rules?

🔨 Intermediate
Self-Balancing BST

Implement an AVL tree with rotations. Show that insertion always maintains O(log n) height. Compare to unbalanced BST on sorted input. Build a simple in-memory database index on top of it.

🔬 Advanced
Compressed Trie + Search Engine

Implement a compressed (Patricia) trie. Build an inverted index for a small document corpus. Support prefix search, wildcard search, and ranked results. Compare memory vs standard trie. How does Elasticsearch do this at scale?

Tree rotations AVL balance factor Red-black trees Tries / prefix trees Inverted index
ConstantO(1)
LogarithmicO(log n)
LinearO(n)
LinearithmicO(n log n)
QuadraticO(n²)
🌱 Novice
The Speed Story

Plot O(1), O(log n), O(n), O(n²), O(2ⁿ) on a spreadsheet up to n=1000. Tell the story in plain English: "If your city doubles, how much longer does this take?" Connect to real apps you use every day.

🔨 Intermediate
Algorithm Audit Report

Write a formal complexity analysis of every algorithm you've built this semester. For each: derive Big-O, give best/worst/average case, measure empirically and compare to theory. Produce a 2-page written report.

🔬 Advanced
NP-Completeness & the Real World

Prove that the Traveling Salesman Problem is NP-Hard by reduction from 3-SAT. Find 2 approximation algorithms. Apply to a real scheduling problem. Discuss: what problems in your domain might be NP-hard in disguise?

Big-O notation Best/worst/average Amortized analysis Space-time tradeoff NP completeness
03 — Semester Calendar

Sixteen weeks,
twelve data structures, one portfolio

Wk Structure / Algo Novice Project Intermediate Project Advanced Project Deliverable
01
Big-O FoundationsWhy complexity mattersSpeed story plottingProfiling your codeFormal complexity proofs
02
Arrays & Dynamic ArraysMemory, indexing, amortizationVoting tally systemArrayList from scratchMemory layout explorerP1 DUE
03
Linked ListsNodes, pointers, traversalPlaylist appDoubly linked list + LRUSkip list implementation
04
Stacks & QueuesLIFO, FIFO, schedulingUndo/redo editorBalanced bracketsMonotonic stack problemsP2 DUE
05
Hash TablesHash functions, collisionsStudent directoryHash table from scratchBloom filters + privacy
06
Hash Tables LabLoad factors, privacy implicationsWord frequency counterOpen addressing variantPassword hashing researchP3 DUE
07
Binary Trees & BSTsTraversals, BST propertyFamily tree visualizerBook search BSTBST → decision tree bridge
08
Heaps & Priority QueuesHeapify, schedulingER triage simulatorHeap from scratchMedian maintenanceP4 DUE
09
Sorting AlgorithmsMerge, quick, radix, stabilitySorting race visualizerSort the censusBeat O(n log n)
10
Search AlgorithmsBinary search, two pointersGuess my numberMedical record lookupBinary search on answerP5 DUE
11
Graphs IRepresentations, BFS, DFSSix degrees campusTransit BFS/DFSCycle detection + topo sort
12
Graphs IIDijkstra, PageRank, social netsFriend network mapRoute optimizer DijkstraPageRank from scratchP6 DUE
13
Dynamic Programming IMemoization, tabulationCommunity budget plannerText diff toolDP complexity proofs
14
Balanced Trees & TriesAVL, red-black, autocompleteCultural autocompleteAVL tree implementationCompressed trie + search engineP7 DUE
15
Complexity Deep DiveAmortized, NP introAlgorithm comparison deckFull semester auditNP-hardness reduction
16
🎓 Portfolio DayShowcase + celebrateCommunity demo dayGitHub portfolio reviewResearch lightning talksFINAL
04 — Assessment

What you build, not what you memorize

We use a portfolio model tied to contract grading. You choose your grade commitment at week 1. Projects are submitted in a GitHub portfolio — your permanent proof of skill that transfers anywhere you go.

50%
Weekly Mini-Projects

12 project-based assessments, one per data structure/algorithm. Graded on correctness, reflection, and communication — not speed.

20%
Complexity Analysis

Written Big-O analysis for each project. Show your work. Prove, don't just state. Empirical benchmarking counts equally with theoretical proof.

20%
Final Capstone

An end-to-end system combining at least 3 data structures. Built for a real community need. Presented live with a code walkthrough.

10%
Critical Reflections

4 written reflections asking: who does this data structure serve? What assumptions does it make? What community could build something better?

05 — Pedagogical Roots

Why we teach DSA
this way

Every Algorithm Has Values

Priority queues make choices about who matters. Hash tables make choices about what "same" means. Sorting algorithms make choices about what "order" means. We name these choices explicitly so students can change them.

Project-Based Learning First

Based on Seymour Papert's constructionism and Buck Institute for Education PBL principles: you learn DSA by building real things with DSA. Each project is the lesson — not an application of the lesson.

Community as Context

Bay Area transit networks. Student election systems. Emergency room triage. These aren't cute examples — they're systems that affect the lives of students in this room. Real context = real motivation.

Transfer Readiness Built In

Every project is GitHub-hosted. Every complexity analysis is written. The portfolio approach aligns with SJSU, Cal Poly, UC Berkeley expectations. Students leave with a portfolio, not just a grade.

Three Tracks = True Inclusion

The three-track system isn't tracking students — it's giving every student access to the same powerful ideas at their own entry point. Students choose their depth. Students can move tracks anytime.

Failure as Data, Not Shame

An algorithm that hits worst-case O(n²) isn't a failure — it's information. We build a classroom culture where debugging, wrong answers, and failed experiments are the most educational moments of the week.