// DS 320 · Algorithms for Data Science · Spring 2026

LeetCode Practice Problems

Problems mapped lecture-by-lecture. Each one requires only what has been taught up to that point — no forward knowledge needed.

Easy — builds intuition
Medium — exam-level
Hard — go beyond
50
Problems
14
Easy
24
Medium
12
Hard
22
Lectures
How to use this page: Problems are grouped by the exact lecture that teaches what you need to solve them. The small tag is a one-word nudge toward the key idea — no hints about the solution. Collapsed "Extra" sections contain closely related problems that don't perfectly match a single lecture. Click any row to open on LeetCode.

01Asymptotic Analysis & Sorting

Big-O / Ω / Θ · Insertion Sort · Loop invariants · Comparison-based lower bound

02Graphs — DFS, BFS & Topological Sort

Graph ADT · DFS pre/post-order & edge types · Topological ordering · BFS layers · Bipartiteness

03Greedy Algorithms

Dijkstra · Greedy stays ahead · Interval scheduling · Optimal caching · Greedy exchange · Minimising lateness

04Divide & Conquer

MergeSort + strong induction · Master Theorem · Closest pair of points · Karatsuba / Strassen
+ Extra — Divide & Conquer (broader than Karatsuba/Strassen)
Great D&C problems, but this one is really about binary search rather than integer/matrix multiplication.

05Dynamic Programming

Weighted interval scheduling · 0/1 Knapsack · Segmented least squares · Bellman-Ford shortest paths
+ Extra — Dynamic Programming (classic DP problems not tied to a specific lecture's algorithm)

06NP-Completeness & Reductions

3-SAT · Independent Set · 3-SAT ≤_P Independent Set · P vs NP · Certificate verification

07Linear Programming, Game Theory & Online Learning

LP formulations · LP duality · Zero-sum games · Minimax theorem · MWU / Regret

Beyond the Curriculum

not in DS 320
Important techniques that DS 320 doesn't cover, but that are foundational for algorithm design more broadly and extremely common in interviews and competitive programming. These complement what you've learned — treat them as electives after finishing the course material.

Textbook references: Greedy (L6–9) → KT §4. D&C (L10–12) → KT §5. DP (L13–16) → KT §6 & CLRS §15 & §24. NP (L17) → KT §8. LP (L18–22) → LP Guide on the course site. LeetCode explore cards for Graphs and Dynamic Programming are excellent companions.