Worst and average case analysis. Recurrences and asymptotics. Efficient algorithms for sorting, searching, and selection. Data structures: binary search trees, heaps, hash tables. Algorithm design techniques: divide-and-conquer, dynamic programming, greedy algorithms, amortized analysis, randomization. Algorithms for fundamental graph problems: minimum-cost spanning tree, connected components, topological sort, and shortest paths. Possible additional topics: network flow, string searching. Prerequisite: 103 or 103B; 109 or STATS 116.
Matriculated Stanford graduate students may enroll for 3, 4 or 5 units; everyone else must take the course for 5 units. All students do 5 units worth of work, including Stanford graduate students enrolled for 3 or 4 units.
Limited Enrollment Details: CS 161 is not open to High School Summer College or Horizon Scholar students. For a list of available Computer Science courses, please select "High School" or "Horizon Scholar" in the Student Population section of the Course page.
CS 103; 109 or STATS 116, or equivalents.