Skip to content

Latest commit

 

History

History
75 lines (59 loc) · 2.44 KB

File metadata and controls

75 lines (59 loc) · 2.44 KB

Math & Number Theory

Mathematical problems and number theory algorithms.

Key Concepts Covered

  • Prime numbers and factorization
  • GCD and LCM
  • Modular arithmetic
  • Power function
  • Divisors and factors
  • Perfect numbers and squares
  • Armstrong numbers
  • Modular exponentiation
  • Arithmetic progressions
  • Expression evaluation

Problems in this Directory

Prime Numbers

GCD & Divisors

Modular Arithmetic

Power & Factorials

Division

Perfect Numbers & Squares

Special Numbers

Digits & Sum

Character Checks

Bit Operations

Arithmetic Progression

Expression Evaluation

Tips

  • Master modular arithmetic—it appears everywhere
  • (a * b) % m = ((a % m) * (b % m)) % m
  • For modular inverse: use Fermat's theorem when m is prime
  • Prime factorization in O(√n)
  • Sieve modifications for advanced problems