-
Foundation
-
What's more important than performance
- Correctness
- Programmer Time
- Maintainbility
- Robustness
- User-Friendliness
-
Random-Access machine Model
- No concurrent operations
- Each instruction takes a constant amount of time
-
Notation
- Θ
- O
- Ω
- o
- Common Function
-
Recurrence Analysis
-
Substitution Method
- 1. [Guess] the form of the solution
- 2. [Verify] by mathematical induction
-
Recursion-Tree Method
- Topic
-
Master Method
- Topic
- Topic
- Probabilistic Analysis
-
Divide-and-Conquer
-
Divide Paradigm
- 1. [Divide] the problem into subproblems
- 2. [Conquer] subproblems by solving them recursively
- 3. [Combine] subproblems' solutions
- Topic
-
Examples
- Merge Sort
- Binary Search
- Fibonacci Numbers
- Matrix Multiplication
- Closest Pair of Points
-
Sorting Algorithm
- Quick Sort
-
Counting Sort
- Topic
-
Radix Sort
-
Idea
- Topic
-
Correctness
- Topic
- Analysis
- Bucket Sort
- Sorting Network
- Dynamic Programming
- Greedy Algorithm
- Amortized Analysis, Heaps
- Graph Algorithm
- String Match
- NP-Completeness
- Approximation Algorithm