We use cookies for site analytics. Accept to help us understand how the site is used. See our Privacy Policy for details.
Math problems reward spotting the closed form or the invariant rather than simulating: the sieve for primes, digit-sum properties for add-digits, or reasoning about overflow in palindrome checks. They are common in early screens because they are quick to state and quick to grade. Watch integer overflow and negative-number edge cases, which is what most of these are really testing.
Primes, digits, base conversion, or a problem with a formula hiding behind it.
21 problems. Each one runs in an in-browser editor against real test cases, with hints and a worked solution.
The patterns cheat sheet covers all of these in one page - what each one looks like in a problem statement, and the template that follows.