Skip to content
Tech Interview Prep home
Technical interview guide

Math & Geometry

Problems that lean on a specific mathematical insight — number theory, combinatorics, or coordinate geometry — rather than a general algorithmic pattern.

Read
42 min
Practice MCQs
25
Interview QA
25
Edition
v7
Editorial status
Reviewed

Scope: Language-neutral, with integer semantics cited from CPython 3.14.

Interview QA

Treat each question like a live interview question: answer out loud first (structure, assumptions, tradeoffs), then open the model answer to spot gaps and rehearse a tighter follow-up.

Curated: · Written: · Reviewed:

QA-1

Explain integer overflow in intermediate results and how it changes a production decision.

QA-2

Walk through negative values under modulo, including where engineers most often get it wrong.

QA-3

How do floating-point representation limits and rounding errors impact geometric predicates, and how do you achieve numerical robustness with epsilon comparisons or exact arithmetic?

QA-4

What does modular inverse guarantee, and what does it deliberately leave open?

QA-5

Describe fast exponentiation and the evidence you would collect before relying on it.

QA-6

A teammate proposes a design that hinges on the greatest common divisor. How do you evaluate it?

QA-7

Where does primality testing matter, and where is it irrelevant?

QA-8

Teach the sieve of Eratosthenes to an engineer who has only seen it as a rule of thumb.

QA-9

What causes catastrophic cancellation in floating-point operations, and what algorithmic refactorings or algebraic reformulations prevent severe loss of precision?

QA-10

How do you use the 2D cross product to determine whether three points turn clockwise, counter-clockwise, or are collinear?

QA-11

How do you detect whether two 2D line segments intersect, and how do you handle edge cases such as collinearity and bounding-box overlap?

QA-12

How does integer-only geometry change if the workload grows by two orders of magnitude?

QA-13

A vendor promises the cross product and orientation is handled for you. What do you still own?

QA-14

When would you refuse a design because of segment intersection?

QA-15

How would you explain polygon area without using the usual slogan?

QA-16

What failure would you inject to check a team's understanding of point in polygon?

QA-17

How should on-call treat an alert that names convex hulls as the cause?

QA-18

What belongs in a runbook section on closest pair of points, and what does not?

QA-19

How would you review a pull request whose risk is avoiding square roots?

QA-20

What trade-off does combinatorial counting force that a junior answer usually skips?

QA-21

How would you brief product on why computing binomial coefficients safely delays a ship date?

QA-22

What is the smallest experiment that would change your mind about the pigeonhole principle?

QA-23

How does cycle detection in numeric sequences interact with rollback, and where do people ignore that?

QA-24

What would you ask a candidate who recites digit manipulation but cannot apply it?

QA-25

How would you document stating numeric assumptions so the next owner can operate it?