A handful of number facts come up again and again in coding screens, usually hidden inside a story. Two schedules meeting again is a least common multiple. A huge power that must be reported modulo a prime is binary exponentiation. Counting primes up to n is a sieve. Counting selections is a binomial coefficient, and printing a value in another base is repeated division.
Each one has a trap. Multiplying before dividing can overflow, so compute lcm(a, b) as a / gcd(a, b) * b. A product of two numbers below 1,000,000,007 needs 64 bits, so Java needs long and JavaScript needs BigInt or a careful split. Pascal's rule must update a single row from right to left, or it reads values it has just changed.
Say the bounds before you code: how big can the answer get, and which type holds it? Interviewers often care more about that sentence than the formula.
Divide before multiplying, and walk the exponent one bit at a time.