Concepts2
⚙️AlgorithmIntermediate
Pigeonhole Principle Applications
The Pigeonhole Principle says if you put more items than boxes, at least one box must contain two or more items; this simple idea powers many algorithmic guarantees.
#pigeonhole principle#dirichlet principle#cycle detection+11
⚙️AlgorithmIntermediate
Digit DP
Digit DP is a dynamic programming technique for counting or aggregating values over all integers in a range that satisfy a digit-based property.
#digit dp#dynamic programming#tight constraint+12