Concepts5
⚙️AlgorithmIntermediate
Problem Classification Patterns
Many competitive programming problems map to a small set of classic patterns; recognizing keywords and constraints lets you pick the right tool fast.
#problem classification#binary search on answer#two pointers+12
⚙️AlgorithmIntermediate
LCA - Binary Lifting
Binary lifting precomputes 2^k ancestors for every node so we can jump upward in powers of two.
#lca#binary lifting#tree+12
⚙️AlgorithmIntermediate
Bridge Tree
A bridge tree is built by contracting every 2-edge-connected component of an undirected graph into a single node, leaving only bridges as edges between nodes.
#bridge tree#2-edge-connected components#bridges+12
⚙️AlgorithmIntermediate
Tree Distances and Diameter
Tree diameter is the longest simple path in a tree and can be found with two BFS/DFS runs.
#tree diameter#tree center#eccentricity+12
🗂️Data StructureIntermediate
Sparse Table
A Sparse Table is a static range-query data structure that preprocesses an array in O(n \log n) time and answers many queries in O(1) time.
#sparse table#range minimum query#rmq+12