This repo contains course notes and assignments, most implemented both in Java and Python, in the Algorithms specialization from Stanford University on Coursera.
- Karatsuba Multiplication
- Number of Inversions
- Closest Pair
- Quick Sort
- Random Selection
- Graph Representation
- Minimum Cut
- Select & Rank
- AVL Tree
- Red-Black Tree
- BFS and Its Applications
- DFS and Its Applications
- Scheduling
- Single-Vertex Shortest Paths
- Dijkstra's Algorithm
- Minimum Spanning Tree
- Prim's Algorithm
- Kruskal's Algorithm
- Data Structure-Union Find
- Huffman Encoding
- Maximum-Weight Independent Set in Path Graph
- Weighted Interval Scheduling
- Knapsack
- Sequence Alignment
- Optimal BST
- Bellman-Ford's Algorithm
- Floyd-Warshall's Algorithm
- Johnson's Algorithm
-
Approach 1-Focus on some computationally tractable special cases (=> Exact algorithms)
- Maximum-Weight Independent Set
- 2-SAT
-
Approach 2-Solve in exponential-time, but faster than brute-force way (=> Exact algorithms)
- Knapsack with Dynamic Programming-Based Algorithm
- Vertex Cover
- Traveling Salesman
-
Approach 3-Use heuristics (efficient algorithms that are not always correct) (=> Approximate algorithm)
Frequently-used heuristic design paradigms:
- Greedy
- Knapsack with Greedy-Based Heuristic
- Dynamic programming
- Knapsack with Dynamic Programming-Based Heuristic
- Local search
- Maximum Cut
- Greedy
This repo is distributed under the MIT license.