Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Maximum subarray sum (Kadane)
- Minimum spanning tree (Kruskal, Prim, Boruvka)
- SCC (kosaraju, tarjan)
- Articulation points, biconnected components, bridge (tarjan)
- LIS (dp)
- Knapsack (dp)
- Maximum matching/independent set on tree (dp)
- Counting inversions (merge sort, BIT)
- Next greater element (stack)
- Convex hull (graham scan, andrew’s monotone chain)
- Lowest common ancestor (sparse table, binary lifting, segment tree)
- Shortest path from source node with unit edge weights (bfs)
- Shortest path from source node with nonnegative edge weights (dijkstra)
- Area of polygon (shoelace)
- Checking clockwise/counterclockwise points (cross product)
- Check if a point is a convex polygon (binary search)
- Find power of a number (binary exponentiation)
- Maximum clique/independent set (meet in the middle)
- Check if a point is in a polygon
- Shortest path from source node (bellman-ford)
- All pair shortest paths (floyd-warshall)
- Edit distance (dp)
- LCS (dp)
- Number of distinct substrings (suffix array)
- Number of palindromic substrings (manacher, hashing, palindromic tree)
- 2-satisfiability (SCC)
- Single string matching (prefix function, z function, hashing)
- Multiple string matching (aho-corasick)
- Bipartite matching (Kuhn’s algorithm)
- Given a set of lines and a lot of x, for each x, find the minimum y value (CHT)
- GCD, modular inverse (Euclidean’s algorithm)
- Euler tour/circuit (Fleury)
- Product of 2 polynomials (Karatsuba, FFT)
- Solve system of linear equations (Gaussian Elimination)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement