core practice · coding problem

GCD and modulo arithmetic

gcd(48,18)? What is (7^10) mod 13 via repeated squaring?

The mechanism

Interviews use math sparingly: gcd/lcm, modular arithmetic, primes, combinatorics, and basic geometry (cross product, line intersection). Recognize the shape of the problem — the formula is a quick lookup away.

Study Math & Geometry

Expected evidence

gcd=6; 7^10 mod 13 = 4.

Try this drill in the practice workspace →

Hints when you need them
  • Euclidean gcd.
  • Binary exponentiation reduces mod each step.

Check the sources

Browse all practice briefs