https://github.com/asarkar/algorithms-design-analysis
Lecture videos and homework for Algorithms: Design and Analysis, Part 1, taught by Tim Roughgarden
https://github.com/asarkar/algorithms-design-analysis
algorithms coursera data-structures scala stanford
Last synced: 6 months ago
JSON representation
Lecture videos and homework for Algorithms: Design and Analysis, Part 1, taught by Tim Roughgarden
- Host: GitHub
- URL: https://github.com/asarkar/algorithms-design-analysis
- Owner: asarkar
- Created: 2018-11-29T07:44:48.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-07-30T10:05:48.000Z (over 2 years ago)
- Last Synced: 2025-05-06T02:41:40.601Z (11 months ago)
- Topics: algorithms, coursera, data-structures, scala, stanford
- Language: Scala
- Homepage:
- Size: 58.1 MB
- Stars: 1
- Watchers: 2
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://github.com/asarkar/algorithms-design-analysis/actions/workflows/ci.yml)
Lecture videos and answers to homeworks for [Algorithms: Design and Analysis, Part 1](https://online.stanford.edu/courses/soe-ycsalgorithms1-algorithms-design-and-analysis-part-1) - an online course offered by Stanford University and taught by Prof. Tim Roughgarden.
## Syllabus:
### 1. Introduction
1.1 [Why Study Algorithms?](https://www.youtube.com/watch?v=yRM3sc57q0c)
1.2 [Integer Multiplication](https://www.youtube.com/watch?v=6u0Vaj4nn54)
1.3 [Karatsuba Multiplication](https://www.youtube.com/watch?v=JCbZayFr9RE)
1.4 [About the Course](https://www.youtube.com/watch?v=F-WS73Y_RU4)
1.5 [Merge Sort: Motivation and Example](https://www.youtube.com/watch?v=kiyRJ7GVWro)
1.6 [Merge Sort: Pseudocode](https://www.youtube.com/watch?v=rBd5w0rQaFo)
1.7 [Merge Sort: Analysis](https://www.youtube.com/watch?v=8ArtRiTkYEw)
1.8 [Guiding Principles for Analysis of Algorithms](https://www.youtube.com/watch?v=-yP11jqilwM)
### 2. Asymptotic Analysis
2.1 [The Gist](https://www.youtube.com/watch?v=l-cNaKGc-yY)
2.2 [Big-Oh Notation](https://www.youtube.com/watch?v=QfRSeibcugw)
2.3 [Basic Examples](https://www.youtube.com/watch?v=5rZCkblZFZM)
2.4 [Big Omega and Theta](https://www.youtube.com/watch?v=-IanHYk6tU4)
2.5 [Additional Examples (Review - Optional)](https://www.youtube.com/watch?v=VXQ2p6V5ccQ)
### 3. Divide & Conquer Algorithms
3.1 [O(n log n) Algorithm for Counting Inversions I](https://www.youtube.com/watch?v=7_AJfusC6UQ)
3.2 [O(n log n) Algorithm for Counting Inversions II](https://www.youtube.com/watch?v=I6ygiW8xN7Y)
3.3 [Strassen's Subcubic Matrix Multiplication Algorithm](https://www.youtube.com/watch?v=ORrM-aSNZUs)
3.4 [O(n log n) Algorithm for Closest Pair I (Advanced - Optional)](https://www.youtube.com/watch?v=3pUOv_ocJyA)
3.5 [O(n log n) Algorithm for Closest Pair II (Advanced - Optional)](https://www.youtube.com/watch?v=7tiafUFrlBw)
### Homework 1
* [Problem Set](https://blogs.asarkar.com/algorithms-design-analysis/set-1/)
* [Optional Theory Problems](homework-1/src/main/scala/org/asarkar/homework/OptionalProblems.scala)
* [Programming Assignment](homework-1/src/main/scala/org/asarkar/homework/Assignment1.scala)
### 4. The Master Method
4.1 [Motivation](https://www.youtube.com/watch?v=6dGDcszz2DM)
4.2 [Formal Statement](https://www.youtube.com/watch?v=rXiojCN9nIs)
4.3 [Examples](https://www.youtube.com/watch?v=4l1MvY7iGhs)
4.4 [Proof I](https://www.youtube.com/watch?v=6BVNhKm0vpE)
4.5 [Interpretation of the 3 Cases](https://www.youtube.com/watch?v=zMYHz5s45T4)
4.6 [Proof II](https://www.youtube.com/watch?v=cVni6SJrsFw)
### 5. Quicksort - Algorithm
5.1 [Quicksort: Overview](https://www.youtube.com/watch?v=ETo1cpLN7kk)
5.2 [Partitioning Around a Pivot](https://www.youtube.com/watch?v=LYzdRN5iFdA)
5.3 [Correctness of Quicksort (Review - Optional)](https://www.youtube.com/watch?v=Colb_4jAy8A)
5.4 [Choosing a Good Pivot](https://www.youtube.com/watch?v=kqO46FOUTbI)
### 6. Quicksort - Analysis
6.1 [Analysis I: A Decomposition Principle (Advanced - Optional)](https://www.youtube.com/watch?v=sToWtKSYlMw)
6.2 [Analysis II: The Key Insight (Advanced - Optional)](https://www.youtube.com/watch?v=4t_Y-aGLkok)
6.3 [Analysis III: Final Calculations (Advanced - Optional)](https://www.youtube.com/watch?v=IBTvneWhFsA)
### 7. Probability Review
7.1 [Probability Review I (Review - Optional)](https://www.youtube.com/watch?v=uLeIMwMHX5U)
7.2 [Probability Review II (Review - Optional)](https://www.youtube.com/watch?v=lkK8dF0io6Y)
### Homework 2
* [Problem Set](https://blogs.asarkar.com/algorithms-design-analysis/set-2/)
* [Optional Theory Problems](homework-2/src/main/scala/org/asarkar/homework/OptionalProblems.scala)
* [Programming Assignment](homework-2/src/main/scala/org/asarkar/homework/Assignment2.scala)
### 8. Linear-time Selection
8.1 [Randomized Selection - Algorithm](https://www.youtube.com/watch?v=nFw6x7DoYbs)
8.2 [Randomized Selection - Analysis](https://www.youtube.com/watch?v=rX2u2CnpveQ)
8.3 [Deterministic Selection - Algorithm (Advanced - Optional)](https://www.youtube.com/watch?v=L5-4cPW5HoU)
8.4 [Deterministic Selection - Analysis I (Advanced - Optional)](https://www.youtube.com/watch?v=6ntwpZmHN-g)
8.5 [Deterministic Selection - Analysis II (Advanced - Optional)](https://www.youtube.com/watch?v=hUuTcyQShYo)
8.6 [Omega(n log n) Lower Bound for Comparison-Based Sorting (Advanced - Optional)](https://www.youtube.com/watch?v=aFveIyII5D4)
### 9. Graphs and the Contraction Algorithm
9.1 [Graphs and Minimum Cuts](https://www.youtube.com/watch?v=4Ih3UhVuEtw)
9.2 [Graph Representations](https://www.youtube.com/watch?v=b-Mfu8dPv9U)
9.3 [Random Contraction Algorithm](https://www.youtube.com/watch?v=c75gg0wicus)
9.4 [Analysis of Contraction Algorithm](https://www.youtube.com/watch?v=b-_jx2-cK8c)
9.5 [Counting Minimum Cuts](https://www.youtube.com/watch?v=S9mIhgghfkc)
### Homework 3
* [Problem Set](https://blogs.asarkar.com/algorithms-design-analysis/set-3/)
* [Optional Theory Problems](https://blogs.asarkar.com/algorithms-design-analysis/hw-3-opt/)
* [Programming Assignment](homework-3/src/main/scala/org/asarkar/homework/Assignment3.scala)
### 10. Graph Search and Connectivity
10.1 [Graph Search - Overview](https://www.youtube.com/watch?v=SW6jwg7WS48)
10.2 [Breadth-First Search (BFS): The Basics](https://www.youtube.com/watch?v=73qCvXsYkfk)
10.3 [BFS and Shortest Paths](https://www.youtube.com/watch?v=AhEZ4yjkVxA)
10.4 [BFS and Undirected Connectivity](https://www.youtube.com/watch?v=vHqaiQlOzOw)
10.5 [Depth-First Search (DFS): The Basics](https://www.youtube.com/watch?v=_9_VUNrWGUs)
10.6 [Topological Sort](https://www.youtube.com/watch?v=ozso3xxkVGU)
10.7 [Computing Strong Components: The Algorithm](https://www.youtube.com/watch?v=O98hLTYVN3c)
10.8 [Computing Strong Components: The Analysis](https://www.youtube.com/watch?v=gbs3UNRJIYk)
10.9 [Structure of the Web (Optional)](https://www.youtube.com/watch?v=7YodysGShlo)
### Homework 4
* [Problem Set](https://blogs.asarkar.com/algorithms-design-analysis/set-4/)
* [Optional Theory Problems](https://blogs.asarkar.com/algorithms-design-analysis/hw-4-opt/)
* [Optional Theory Problems Code](homework-4/src/main/scala/org/asarkar/homework/OptionalProblem.scala)
* [Programming Assignment](homework-4/src/main/scala/org/asarkar/homework/Assignment4.scala)
### 11. Dijkstra's Shortest-Path Algorithm
11.1 [Dijkstra's Shortest-Path Algorithm](https://www.youtube.com/watch?v=jRlNVmRjdRk)
11.2 [Dijkstra's Algorithm: Examples](https://www.youtube.com/watch?v=ahYhIzLklYo)
11.3 [Correctness of Dijkstra's Algorithm (Advanced - Optional)](https://www.youtube.com/watch?v=sb7j3EW055M)
11.4 [Dijkstra's Algorithm: Implementation and Running Time](https://www.youtube.com/watch?v=00LtSn_PQjc)
### 12. Heaps
12.1 [Data Structures: Overview](https://www.youtube.com/watch?v=cMrQxxrKg8I)
12.2 [Heaps: Operations and Applications](https://www.youtube.com/watch?v=mNYHDv7SbDI)
12.3 [Heaps: Implementation Details (Advanced - Optional)](https://www.youtube.com/watch?v=6VI5kJu8Mv4)
### 13. Balanced Binary Search Trees
13.1 [Balanced Search Trees: Operations and Applications](https://www.youtube.com/watch?v=IbNZ-x1I2IM)
13.2 [Binary Search Tree Basics I](https://www.youtube.com/watch?v=QNSAqmvu4ZQ)
13.3 [Binary Search Tree Basics II](https://www.youtube.com/watch?v=usq3dxJ2r5k)
13.4 [Red-Black Trees](https://www.youtube.com/watch?v=O8sPoUZMolU)
13.5 [Rotations (Advanced - Optional)](https://www.youtube.com/watch?v=CZkBqasoH8c)
13.6 [Insertion in a Red-Black Tree (Advanced)](https://www.youtube.com/watch?v=c0Y-1UQ3DKg)
### Homework 5
* [Problem Set](https://blogs.asarkar.com/algorithms-design-analysis/set-5/)
* [Optional Theory Problems](https://blogs.asarkar.com/algorithms-design-analysis/hw-5-opt/)
* [Programming Assignment](homework-5/src/main/scala/org/asarkar/homework/Assignment5.scala)
### 14. Hashing: The Basics
14.1 [Hash Tables: Operations and Applications](https://www.youtube.com/watch?v=Qu183GFHbZQ)
14.2 [Hash Tables: Implementation Details I](https://www.youtube.com/watch?v=j5KkC-wjlK4)
14.3 [Hash Tables: Implementation Details II](https://www.youtube.com/watch?v=2MocX5A3pSs)
### 15. Universal Hashing
15.1 [Pathological Data Sets and Universal Hashing Motivation](https://www.youtube.com/watch?v=MWq8BvRR950)
15.2 [Universal Hashing: Definition and Example (Advanced - Optional)](https://www.youtube.com/watch?v=ggCu8rReKjk)
15.3 [Universal Hashing: Analysis of Chaining (Advanced - Optional)](https://www.youtube.com/watch?v=pDNQkF0qTms)
15.4 [Hash Table Performance with Open Addressing (Advanced - Optional)](https://www.youtube.com/watch?v=nWQv4BCEhjM)
### 16. Bloom Filters
16.1 [Bloom Filters: The Basics](https://www.youtube.com/watch?v=zYlxP7F3Z3c)
16.2 [Bloom Filters: Heuristic Analysis](https://www.youtube.com/watch?v=oT-Zhry0hBI)
### Homework 6
* [Problem Set](https://blogs.asarkar.com/algorithms-design-analysis/set-6/)
* [Optional Theory Problems](https://blogs.asarkar.com/algorithms-design-analysis/hw-6-opt/)
* [Programming Assignment](homework-6/src/main/scala/org/asarkar/homework/)
### Final Exam
* [Final Exam](https://blogs.asarkar.com/algorithms-design-analysis/final/)