Modular invariant [mp]
Micro pattern¶
Description¶
Classify states using remainders modulo a fixed number.
Problems¶
Game-state invariant¶
Identify losing states by a repeating residue class.
- 292. Nim Game (Google Prep)
Divisibility classification¶
Check common multiples before less specific factors.
- 412. Fizz Buzz (Top Easy)
Number-theory classification¶
Normalize a value and test a residue class to select a theorem case.
- 279. Perfect Squares (Top Hard)