Useful Links
Computer Science
Algorithms and Data Structures
Algorithm Design and Analysis
1. Introduction to Algorithms
2. Algorithm Analysis
3. Brute-Force and Exhaustive Search
4. Divide and Conquer
5. Greedy Algorithms
6. Dynamic Programming
7. Backtracking and Branch-and-Bound
8. Graph Algorithms
9. String Matching Algorithms
10. Computational Complexity Theory
11. Advanced Topics in Algorithm Design
Greedy Algorithms
The Greedy Strategy
Making Locally Optimal Choices
Greedy-Choice Property
Optimal Substructure
When Greedy Works
When Greedy Fails
Proving Correctness of Greedy Algorithms
Greedy Stays Ahead Argument
Exchange Argument
Cut-and-Paste Argument
Classic Greedy Algorithms
Activity Selection Problem
Problem Statement
Greedy Solution
Correctness Proof
Implementation
Huffman Coding
Problem Statement
Building the Huffman Tree
Encoding Process
Decoding Process
Optimality Proof
Fractional Knapsack Problem
Problem Statement
Greedy Solution
Comparison with 0/1 Knapsack
Analysis
Coin Change Problem
Greedy Approach
When Greedy Works
Counterexamples
Job Scheduling
Minimizing Maximum Lateness
Weighted Job Scheduling
Dijkstra's Algorithm
Single-Source Shortest Path
Algorithm Description
Correctness Proof
Implementation with Priority Queue
Limitations with Negative Weights
Minimum Spanning Tree Algorithms
Problem Statement
Kruskal's Algorithm
Algorithm Description
Union-Find Data Structure
Analysis
Prim's Algorithm
Algorithm Description
Priority Queue Implementation
Analysis
Previous
4. Divide and Conquer
Go to top
Next
6. Dynamic Programming