Topic What It Is Why It Matters
Tries & Suffix Tree-like data structures for Used in autocomplete, spell checkers,
Trees storing strings efficiently. DNA sequencing, and text editors.
Disjoint Set Structure to track elements Core for Kruskal’s MST, cycle detection,
(Union-Find) partitioned into disjoint sets. and network connectivity problems.
Binary tree for range queries Efficient for dynamic range queries in
Segment Trees
(sum, min, max). competitive programming.
Fenwick Tree Space-efficient alternative to Great for prefix sums, cumulative
(BIT) Segment Tree. frequencies, and range queries.
Heavy-Light Splits a tree into chains for fast Optimizes many tree query problems in
Decomposition path queries. contests.
Tarjan’s DFS-based algorithm for finding Key in graph theory, compilers, and
Algorithm strongly connected components. circuit analysis.
String matching with Faster pattern searching than brute
KMP Algorithm
preprocessing of the pattern. force.
Rabin-Karp Ideal for multi-pattern search and
Hashing-based string matching.
Algorithm plagiarism detection.
Bitmask
Represents subsets with bitmasks Solves problems like TSP and subset
Dynamic
inside DP states. optimization efficiently.
Programming
Dynamic
Applies DP transitions over tree Solves hierarchical optimization
Programming
structures. problems on graphs/trees.
on Trees
Johnson’s All-pairs shortest paths for sparse Often faster than Floyd–Warshall on
Algorithm weighted graphs. sparse graphs.
Bellman–Ford Shortest paths with possible Detects negative cycles; useful in
Edge Cases negative edges. finance/arbitrage modeling.
Persistent Data Preserve past versions after Enables undo/versioning; common in
Structures modifications. functional programming.
Advanced Algorithms like Hopcroft–Karp for Crucial for scheduling, assignments,
Graph Matching maximum bipartite matching. and resource allocation.