KatInterview

practice a little every day — you've got this ♡

Math & Bit Manipulation Interview Problems

Practice 5966 original coding, SQL, system design, machine learning and behavioral problems across 15 topics. Coding and SQL problems run against hidden test cases right in your browser; every problem has hints and a worked solution, free.

5966
Problems
2209
Auto-graded
15
Topics
271
Added today

Showing 211–217 of 217 results

  • Math & Bit ManipulationHardAuto-graded
    Minimum LCM Spanning Value of a Sequence

    Tests deep understanding of GCD/LCM relationships by finding the smallest integer ≥ 1 that, when inserted into an array, minimises the LCM of the entire resulting sequence.

    Math & Bit Manipulationmathgcd/lcmnumber theory
  • Math & Bit ManipulationHardAuto-graded
    Balanced-Radix Digital Root Collision Finder

    Tests mastery of base conversion and number theory by finding all integers in a range whose digital roots are identical across two different bases.

    Math & Bit Manipulationmathbit manipulationbase conversionnumber theory
  • Math & Bit ManipulationMediumAuto-graded
    Smallest Integer Divisible by All Values in Every Subarray of Length K

    Tests the ability to combine sliding-window enumeration with LCM/GCD reasoning to find the minimum positive integer that is simultaneously divisible by every contiguous subarray LCM.

    Math & Bit Manipulationmathgcd/lcmsliding window
  • Math & Bit ManipulationMediumAuto-graded
    Modular Exponentiation Tower (Tetration mod M)

    Tests mastery of modular arithmetic by computing a power tower (iterated exponentiation) modulo M using Euler's theorem and recursive modular exponentiation.

    Math & Bit Manipulationmathmodular arithmeticnumber theory
  • Math & Bit ManipulationHardAuto-graded
    Count Permutations With Exact Inversion Pairs

    Tests deep combinatorics knowledge by counting permutations of 1..n that have exactly k inversions, using the Mahonian distribution and efficient DP with modular arithmetic.

    Math & Bit Manipulationcombinatoricsdynamic programmingnumber theory
  • Math & Bit ManipulationMediumAuto-graded
    Modular Exponentiation of a Polynomial at a Point

    Tests the ability to evaluate a polynomial modulo a prime, raise the result to a large power modulo the same prime, and apply Fermat's little theorem for efficiency.

    Math & Bit Manipulationmathmodular arithmeticnumber theory
  • Math & Bit ManipulationMediumAuto-graded
    Count Lattice Paths Through Forbidden Checkpoints

    Tests combinatorial counting of grid paths using inclusion-exclusion and binomial coefficients, requiring precise arithmetic on a bounded lattice.

    Math & Bit Manipulationcombinatoricsmathdynamic programming