Kosaraju Variants
Kosaraju's algorithm finds all strongly connected components in a directed graph in O(V + E) time using two DFS passes: first to order nodes by finish time, then on the reversed graph to identify each SCC.
Found my old codeforces code templates
Kosaraju's algorithm finds all strongly connected components in a directed graph in O(V + E) time using two DFS passes: first to order nodes by finish time, then on the reversed graph to identify each SCC.
KMP algorithm efficiently finds all occurrences of a pattern in text in O(n + m) time by using a failure table to avoid redundant comparisons when mismatches occur.
Fenwick Trees enable efficient range sum queries and point updates in O(log n) time by storing partial sums based on binary index patterns.