← DSADSA 7.4

Math and Number Theory

Not started yet — 7 problems queued.

GCD/LCM via the Euclidean algorithm; primality via trial division or the Sieve of Eratosthenes for bulk prime generation; modular arithmetic for large-number problems.

Sub-patterns

  • A — GCD/LCM. The Euclidean algorithm.
  • B — Sieve of Eratosthenes. Bulk prime generation.
  • C — Modular Exponentiation. Fast exponentiation under a modulus for large-number problems.
  • D — General Math Puzzles. One-off number-theory or arithmetic problems.

Practice set (7)

  • Easy — Fizz Buzz, Happy Number, Roman to Integer, Excel Sheet Column Number
  • Medium — Count Primes, Pow(x, n), Fraction to Recurring Decimal

Notes from readers

Comments — via GitHub