CS 161 Design and Analysis of Algorithms

Winter 2023

Stanford University

This course provides an in-depth exploration of algorithm analysis and design. It covers various sorting, searching, and selection algorithms, data structures, and fundamental graph algorithms. It emphasizes the understanding of worst and average case analysis, recurrences, and asymptotics.

Course Page

Overview

This course will cover the basic approaches and mindsets for analyzing and designing algorithms and data structures. Topics include the following: 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, and randomization. Algorithms for fundamental graph problems: minimum-cost spanning tree, connected components, topological sort, and shortest paths. Possible additional topics: network flow and string searching.

Prerequisites

CS 106B or CS 106X; CS 103 or CS 103B; CS 109 or STATS 116.

Learning objectives

Additional Calculus for Engineers (ACE) is one of the School of Engineering’s Equity and Inclusion Initiatives, designed to provide the skills and solid foundation in mathematics, computational math in engineering, and computer science to undergraduate students interested in pursuing an engineering degree. The goal of ACE is to increase confidence and content knowledge through small group interactive sessions and additional academic resources provided to students enrolled in the program. We especially want to provide an opportunity for students who come from educationally disadvantaged backgrounds or for anyone who feels they might need additional support in order to succeed. We limit enrollment to enable small classes that allow students to have one-on-one interactions with the CA.

Textbooks and other notes

Textbook Information

All the following textbooks are optional. They are all excellent for supplementing lectures with details.

  • Introduction to Algorithms (3rd Ed), Cormen, Leiserson, Rivest, & Stein (available online!)
  • Algorithms, Dasgupta, Papadimitriou, & Vazirani
  • Algorithm Design, Kleinberg & Tardos
  • Algorithms Illuminated, Roughgarden (with great videos!)

All students should retain receipts for books and other course-related expenses, as these may be qualified educational expenses for tax purposes. If you are an undergraduate receiving financial aid, you may be eligible for additional financial aid for required books and course materials if these expenses exceed the aid amount in your award letter. For more information, review your award letter or visit the Student Budget website.

Other courses in Data Structures and Algorithms

CSE 373 Data Structures and Algorithms

Summer 2022

University of Washington

15-451/651 Algorithms

Spring 2022

Carnegie Mellon University

CS 166 Data Structures

Spring 2022

Stanford University

CS 61B: Data Structures

Fall 2022

UC Berkeley

Courseware availability

Lecture slides, notes, and python notebook available at Lectures

No videos available

Homework slides and solutions available at Homework

Sections slides and solutions available at Sections

Covered concepts