Math & Number Theory
Solve problems with number properties, digit manipulation, and arithmetic identities instead of brute-force iteration.
- • Digit manipulation (reverse, count, sum)
- • Primes, GCD/LCM, divisibility
- • Number base conversion
- • A closed-form or formula exists
- • The data structure matters more than the arithmetic
- • Overflow makes direct computation unsafe
- • Integer overflow on intermediate values
- • Negative numbers and sign handling
- • Off-by-one in modulo or digit counts
Key Invariant
Look for a numeric property or identity that replaces iteration with arithmetic