Concepts5
⚙️AlgorithmIntermediate
Constructive Algorithm Techniques
Constructive algorithms build a valid answer directly by following a recipe, rather than searching exhaustively.
#constructive algorithm#greedy construction#invariant+12
⚙️AlgorithmIntermediate
Fix One Variable Technique
The Fix One Variable technique reduces multi-variable search problems by enumerating one variable explicitly and optimizing over the others with structure.
#fix one variable#dimension reduction#two pointers+12
⚙️AlgorithmIntermediate
Invariant Maintenance
An invariant is a property you promise to keep true throughout an algorithm, and it is the anchor of both design and correctness proofs.
#invariant#loop invariant#search invariant+12
⚙️AlgorithmIntermediate
Greedy Algorithms
Greedy algorithms build a solution step by step by always taking the best local choice available.
#greedy algorithms#activity selection#interval scheduling+12
⚙️AlgorithmIntermediate
Two Pointers
Two pointers is a pattern where two indices move through a sequence in a coordinated, usually monotonic way to avoid unnecessary work.
#two pointers#sliding window#opposite ends+12