Coding in C++ and implementing the algorithms mentioned in Stanford's MOOC.
- Merge Sort (I & II)
- Counting Inversions
- Closest Pair
First Step | Second Step |
---|---|
- Quick Sort (Easy way & In Place)
- Randomized Selection (std::stable_partition & std::partition)
- Minimum Cut by Karger Algorithm
- Distance between Vertices in Graph by BFS
- DFS for acylic graph
- Topological Sort
- Strongly Connected Components
- Dijkstra algorithm
-
Median of Integer Stream
-
Binary Search Tree
-
Sum of Completion Time (Greedy Algorithm)
-
Minimum Spanning Tree (Prim)
- Minimum Spanning Tree (Kruskal)
- Clustering (disjoint set)
- Huffman Code
-
Weighted Independent Sets
-
Knapsack Problem (DP)
- Sequence Alignment (Smith–Waterman algorithm)
- Optimal Balanced Search Tree (The right tree is better, considering the weights)