Pattern · Math

Math interview questions

288 math problems tagged across recent interview reports. Drilled most heavily by amazon, google, and meta.

Founder's read

Math problems in coding interviews test number theory, arithmetic, combinatorics, and algorithmic thinking under pressure. With 288 problems tagged across this pattern, you'll encounter everything from binary operations to probability. Amazon, Google, and Meta use Math variants constantly, sometimes as warm-ups, often as interview killers when you freeze on a modulo edge case or miss a mathematical optimization. StealthCoder reads the problem on your screen and solves it in seconds, invisible to the proctor, so a hard Math problem never tanks your OA again.

Most-asked math problems

#ProblemDiff# Companies
01Add Two NumbersMEDIUM36
02Climbing StairsEASY36
03Basic Calculator IIMEDIUM27
04Basic CalculatorHARD17
05Add BinaryEASY11
06Add StringsEASY10
07Basic Calculator IIIHARD10
08Add Two IntegersEASY5
09Best Meeting PointHARD4
10Convert Binary Number in a Linked List to IntegerEASY4
1124 GameHARD3
12Add DigitsEASY3
13Add to Array-Form of IntegerEASY3
14Angle Between Hands of a ClockMEDIUM3
15Check If It Is a Good ArrayHARD3
16Airplane Seat Assignment ProbabilityMEDIUM2
17Apply Operations to Make Sum of Array Greater Than or Equal to kMEDIUM2
18Average Value of Even Numbers That Are Divisible by ThreeEASY2
19Basic Calculator IVHARD2
20Broken CalculatorMEDIUM2
21Bulb SwitcherMEDIUM2
22Check If It Is a Straight LineEASY2
23Construct the Longest New StringMEDIUM2
24Continuous Subarray SumMEDIUM2
25Count All Valid Pickup and Delivery OptionsHARD2
26Count Largest GroupEASY2
27Count Nice Pairs in an ArrayMEDIUM2
282 Keys KeyboardMEDIUM1
29Abbreviating the Product of a RangeHARD1
30Add Two Numbers IIMEDIUM1
31Adding Two Negabinary NumbersMEDIUM1
32Alice and Bob Playing Flower GameMEDIUM1
33Alternating Digit SumEASY1
34Arranging CoinsEASY1
35Best Position for a Service CentreHARD1
36Bitwise OR of All Subsequence SumsMEDIUM1
37Can I WinMEDIUM1
38Categorize Box According to CriteriaEASY1
39Chalkboard XOR GameHARD1
40Check if Point Is ReachableHARD1
41Consecutive Numbers SumHARD1
42Convert a Number to HexadecimalEASY1
43Convert Integer to the Sum of Two No-Zero IntegersEASY1
44Convert to Base -2MEDIUM1
45Count Alternating SubarraysMEDIUM1
46Count AnagramsHARD1
47Count Array Pairs Divisible by KHARD1
48Count Good NumbersMEDIUM1
49Count Integers With Even Digit SumEASY1
50Count Lattice Points Inside a CircleMEDIUM1

Showing top 50 of 288 math problems by # companies asking.

The hedge for the live OA

You can't drill every math variant before the assessment. StealthCoder runs invisibly during screen share and solves whichever variant they throw at you. No browser extension. No detection signature. Made by a working FAANG engineer who treats the OA the way companies treat hiring: as a game with rules you should know.

Get StealthCoder
What this means

Math problems fall into recognizable buckets: digit manipulation (add-binary, add-digits, add-strings), number theory (GCD, LCM, primes), combinatorics, and probability. You spot them fast, they ask for a count, a property, or a transformed result, not graph traversal or string parsing. The trap is implementation. Off-by-one errors, overflow, and missed mathematical properties cost candidates at Bloomberg, Goldman Sachs, and Uber constantly. Drill addition and digit problems first; they're foundational. Then lock in modular arithmetic and number-theoretic tricks. When you hit a live OA and encounter a Math variant you haven't drilled, permutation counting, probability edge case, obscure number theory, StealthCoder provides the solution in real time so you move on without panic.

Companies that hire most on math

The honest play

288 math problems. You won't drill them all. Pass anyway.

Math is one of the patterns interviews actually filter on. Memorizing every variant in a week is a fantasy. StealthCoder is the hedge: an AI overlay invisible during screen share. It reads the problem and surfaces a working solution in under 2 seconds, no matter which math flavor lands in your live OA. Made by a working FAANG engineer who treats the OA the way companies treat hiring: as a game with rules you should know. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Math interview FAQ

How many Math problems should I drill before my interview?+

Start with 20 to 30 core problems: digit manipulation, binary operations, and basic number theory. The 288-problem pool is deep, but 70% of interview Math follows patterns from the first 30. If you're targeting Amazon or Google, add 10 to 15 company-specific variants once you've locked fundamentals.

How do I recognize a Math problem on sight?+

It asks for a numerical result, property, or count without describing a graph, tree, or string manipulation. Keywords: total, sum, product, modulo, count combinations, probability, digit sum, binary representation. If the prompt has numbers and asks 'how many' or 'what is', it's Math.

Which companies drill Math the hardest?+

Amazon leads with 82 problems, followed by Google (72) and Meta (66). Bloomberg (61), Goldman Sachs (47), and Uber (47) also weight Math heavily. If you're interviewing with any of these, Math rigor is non-negotiable.

What's the most common Math gotcha?+

Overflow and modulo arithmetic. Integer limits trip candidates fast. Second: missing the mathematical shortcut. Many Math problems have a one-line insight that replaces 20 lines of iteration. Drill both brute force and the trick.

Should I study Math problems if I'm targeting a systems design or backend role?+

Yes. Math often appears early in coding interviews as a warm-up or filter. Even if your final rounds are systems-focused, you need to survive the Math screening. Amazon and Microsoft use Math to eliminate weak fundamentals before deeper rounds.

Problem and frequency data sourced from public community-maintained interview-report repos. Problems and trademarks © LeetCode.