Quantitative Reasoning Interview Prep
Use this as an interview speaking guide, not as a formula sheet.
For almost every problem:
1. Clarify assumptions.
2. Identify the invariant or governing formula.
3. Solve symbolically.
4. Substitute numbers.
5. Sanity-check the result.
6. Explain the intuition.
1. Regular Hexagon: Find Side Length From Area
Prompt
Given the area A of a regular hexagon, find side length s.
Key idea
A regular hexagon contains 6 equilateral triangles.
Area of one equilateral triangle:
triangleArea = (sqrt(3) / 4) * s²
Hexagon area:
A = 6 * triangleArea
A = (3 * sqrt(3) / 2) * s²
Solve for s:
s² = 2A / (3 * sqrt(3))
s = sqrt(2A / (3 * sqrt(3)))
JavaScript
function hexagonSideFromArea(area) {
return Math.sqrt((2 * area) / (3 * Math.sqrt(3)));
}
Example
const area = 54 * Math.sqrt(3);
console.log(hexagonSideFromArea(area));
// 6
Answer
s = sqrt(2A / (3√3))
Sanity check
Area ∝ side²
Therefore:
side ∝ sqrt(area)
That matches the formula.
What to say aloud
A regular hexagon is six equilateral triangles. I write the triangle-area formula, multiply by six, and solve for the side length.
2. Why Is Summer Hotter Than Winter?
Short answer
Earth's axial tilt ≈ 23.5°
NOT primarily the Earth-Sun distance.
Two effects matter:
1. Sunlight hits the ground more directly.
2. Summer days are longer.
Incidence angle
Suppose θ is the angle between sunlight and the vertical surface normal.
relativeIntensity = cos(θ)
JavaScript:
function relativeSolarIntensity(degrees) {
const radians = (degrees * Math.PI) / 180;
return Math.cos(radians);
}
Examples:
relativeSolarIntensity(0);
// 1.00
relativeSolarIntensity(30);
// 0.866
relativeSolarIntensity(60);
// 0.50
relativeSolarIntensity(75);
// 0.259
So at:
60° from vertical
cos(60°) = 0.5
The same incoming sunlight is spread across approximately twice the ground area.
Why summer gets even hotter
Approximate daily solar energy:
dailyEnergy ≈ solarIntensity × daylightHours
Summer gets:
higher intensity
×
more daylight hours
The effects compound.
Important interview trap
Earth is actually closest to the Sun around early January.
If Earth-Sun distance caused seasons:
Northern Hemisphere
and
Southern Hemisphere
would experience summer together.
They do not.
What to say aloud
Seasons come from Earth's axial tilt. In summer, sunlight arrives closer to perpendicular, so more energy reaches each square meter, and the days are longer. The opposite hemisphere experiences winter at the same time, which is strong evidence that Earth-Sun distance isn't the main cause.
3. Two Spheres With the Same Density
Prompt
Two spheres are made from the same material.
The larger sphere has a diameter 50% larger.
The smaller sphere weighs:
8 lb
Find the larger sphere's weight.
Key idea
Diameter scale:
k = 1.5
Volume scales with the cube of linear dimensions:
volumeRatio = k³
Therefore:
massRatio = 1.5³
= 3.375
Then:
largeMass = 8 × 3.375
= 27 lb
JavaScript
const smallMass = 8;
const scale = 1.5;
const largeMass = smallMass * scale ** 3;
console.log(largeMass);
// 27
Answer
27 lb
What to say aloud
Same material means same density, so mass scales with volume. Sphere volume scales with diameter cubed. A 1.5× diameter therefore means 1.5³ = 3.375× the mass, giving 27 pounds.
4. How Much 1080p30 Video Fits on 1 TB?
Prompt
A 1 TB drive stores:
1920 × 1080 video
30 FPS
How many minutes fit?
First thing to say
The problem is underspecified.
Resolution + FPS
does NOT determine compressed video size.
You need either:
bits per pixel
or
compressed bitrate
Ask:
Should I assume raw RGB video or a compressed bitrate?
Case A: Raw RGB
Assume:
width = 1920
height = 1080
fps = 30
bytesPerPixel = 3
storage = 1 TB = 10¹² bytes
JavaScript
const width = 1920;
const height = 1080;
const fps = 30;
const bytesPerPixel = 3;
const bytesPerFrame = width * height * bytesPerPixel;
const bytesPerSecond = bytesPerFrame * fps;
const driveBytes = 1e12;
const seconds = driveBytes / bytesPerSecond;
const minutes = seconds / 60;
console.log({
bytesPerFrame,
bytesPerSecond,
minutes,
});
Result:
bytes/frame ≈ 6.22 MB
bytes/sec ≈ 186.6 MB/s
duration ≈ 89.3 minutes
Answer for raw RGB
≈ 90 minutes
Case B: Compressed Video
General formula:
durationSeconds =
storageBits / bitrateBitsPerSecond
For 1 TB:
function videoMinutes(storageTB, bitrateMbps) {
const storageBits = storageTB * 1e12 * 8;
const bitrate = bitrateMbps * 1e6;
return storageBits / bitrate / 60;
}
Examples:
videoMinutes(1, 5);
// ≈ 26667 minutes
videoMinutes(1, 10);
// ≈ 13333 minutes
videoMinutes(1, 20);
// ≈ 6667 minutes
Interview lesson
The most important observation is:
storage depends on encoding / bitrate
not just:
resolution × FPS
5. Drop a Dense Stone From a Boat Into Water
Prompt
A dense stone is initially sitting inside a floating boat.
You throw the stone into the water.
The stone sinks.
Does the pool water level:
rise
fall
stay the same
Answer
FALL
Before
While inside the boat, the stone causes the boat to displace water equal to the stone's weight.
displacedVolumeBefore =
stoneMass / waterDensity
After
When the stone sinks, it displaces only its physical volume.
displacedVolumeAfter =
stoneMass / stoneDensity
Because:
stoneDensity > waterDensity
therefore:
stoneMass / stoneDensity
<
stoneMass / waterDensity
So:
after displacement
<
before displacement
Therefore:
water level falls
JavaScript representation
const mass = 10;
const waterDensity = 1000;
const stoneDensity = 2500;
const before = mass / waterDensity;
const after = mass / stoneDensity;
console.log(after < before);
// true
What to say aloud
In the boat, the stone causes displacement based on its weight. Once submerged, it displaces only its own volume. Since the stone is denser than water, its volume is smaller than the volume of water having the same weight, so the water level falls.
6. $1000 at 100% Interest for 20 Years
Clarification
Ask whether interest is:
simple
or
compounded
Usually assume annual compounding.
Formula
futureValue =
principal × (1 + rate)^years
Here:
principal = 1000
rate = 1.0
years = 20
Therefore:
futureValue
= 1000 × 2²⁰
We know:
2²⁰ = 1,048,576
Therefore:
$1,048,576,000
JavaScript
const principal = 1000;
const rate = 1;
const years = 20;
const amount = principal * (1 + rate) ** years;
console.log(amount);
// 1048576000
Answer
≈ $1.05 billion
Interview concept
This tests exponential growth.
At 100% annual interest:
money doubles every year
7. Randomly Choose a d6 or d8
Setup
Choose randomly between:
D6
D8
So:
P(D6) = 1/2
P(D8) = 1/2
Part A: Probability of Rolling a 3
P(3 | D6) = 1/6
P(3 | D8) = 1/8
Total probability:
P(3)
=
P(D6) × P(3 | D6)
+
P(D8) × P(3 | D8)
Substitute:
= (1/2)(1/6)
+ (1/2)(1/8)
= 1/12 + 1/16
= 4/48 + 3/48
= 7/48
Answer
7/48
Part B: Given a 3, Probability It Was the d6
Bayes:
P(D6 | 3)
=
P(3 | D6) P(D6)
-----------------
P(3)
Substitute:
=
(1/6 × 1/2)
-------------
7/48
=
1/12
-----
7/48
=
4/7
Answer
P(D6 | 3) = 4/7
P(D8 | 3) = 3/7
Part C: Expected Value of the Next Roll
Expected d6:
E[D6] = (1 + 6) / 2 = 3.5
Expected d8:
E[D8] = (1 + 8) / 2 = 4.5
Using posterior probabilities:
E[next]
=
(4/7)(3.5)
+
(3/7)(4.5)
JavaScript:
const expected = (4 / 7) * 3.5 + (3 / 7) * 4.5;
console.log(expected);
// 3.928571...
Exact:
55/14
Approximate:
3.93
8. Probability the 13th Is a Friday
Simple interview assumption
If weekdays are uniformly distributed:
P(Friday) = 1/7
Approximate:
14.29%
Exact Gregorian Calendar
The Gregorian calendar repeats every:
400 years
That contains:
400 × 12
= 4800 months
Friday occurs as the 13th:
688 times
Therefore:
688 / 4800
= 43 / 300
≈ 14.333%
Strong interview answer
Assuming weekday alignment is uniform, the answer is 1/7. If you're asking for the exact Gregorian-calendar frequency, it's 43/300, or about 14.33%.
9. 3D Tic-Tac-Toe Winning Lines
Important clarification
For:
3 × 3 × 3
the answer is:
49
For:
4 × 4 × 4
with four cells required:
76
If the expected answer is 49, assume a 3×3×3 board.
Count 3×3×3 Winning Lines
Axis-parallel
Three directions:
x
y
z
Each has:
3 × 3 = 9
So:
3 × 9 = 27
Face diagonals
6 faces
×
2 diagonals
=
12
Running total:
27 + 12 = 39
Middle-plane diagonals
Three central planes:
xy
xz
yz
Each contributes:
2
Therefore:
3 × 2 = 6
Running total:
45
Space diagonals
A cube has:
4
body diagonals.
Total:
27 + 12 + 6 + 4
= 49
Answer
49
10. Distance From a Point to a Plane
Plane:
Ax + By + Cz + D = 0
Point:
P = (x0, y0, z0)
Distance:
|Ax0 + By0 + Cz0 + D|
d = -----------------------------
sqrt(A² + B² + C²)
JavaScript
function pointToPlaneDistance(point, plane) {
const { x, y, z } = point;
const { A, B, C, D } = plane;
const numerator = Math.abs(A * x + B * y + C * z + D);
const denominator = Math.sqrt(A ** 2 + B ** 2 + C ** 2);
return numerator / denominator;
}
Intuition
(A, B, C)
is the plane's normal vector.
The formula measures how far the point extends along that perpendicular direction.
11. Estimate Earth-Moon Distance
Useful rough value:
≈ 384,400 km
Interview estimate:
≈ 4 × 10⁵ km
Fermi approach
Earth radius:
≈ 6400 km
Moon distance:
≈ 60 Earth radii
Therefore:
60 × 6400
=
384,000 km
JavaScript
const earthRadius = 6400;
const earthRadiiToMoon = 60;
console.log(earthRadius * earthRadiiToMoon);
// 384000
Light-time sanity check
Speed of light:
≈ 300,000 km/s
Therefore:
384,000 / 300,000
≈ 1.28 seconds
12. Expected Number of Times max Changes
Consider:
let max = -Infinity;
for (const value of values) {
if (value > max) {
max = value;
}
}
Suppose values is a random permutation of n distinct values.
How many times does max update on average?
Key observation
At position i, the current element becomes the new maximum if it is the largest among the first i elements.
Each of those i positions is equally likely to contain that maximum.
Therefore:
P(update at position i) = 1/i
Expected updates:
E =
1
+ 1/2
+ 1/3
+ ...
+ 1/n
This is the harmonic number:
Hn
Approximation:
Hn ≈ ln(n) + 0.577
JavaScript
function expectedMaxUpdates(n) {
let result = 0;
for (let i = 1; i <= n; i++) {
result += 1 / i;
}
return result;
}
For one million:
expectedMaxUpdates(1_000_000);
// ≈ 14.39
Approximation:
Math.log(1_000_000) + 0.57721;
// ≈ 14.39
Answer
E = Hn ≈ ln(n) + γ
Interesting intuition:
1,000,000 values
but max changes only
≈ 14 times on average.
13. Buffon's Needle
Setup
Parallel lines are separated by:
D
Needle length:
L
Assume:
L <= D
Probability of crossing a line:
P = 2L / (πD)
If:
L = D = 1
then:
P = 2/π
≈ 0.637
JavaScript
function buffonProbability(length, spacing) {
return (2 * length) / (Math.PI * spacing);
}
buffonProbability(1, 1);
// ≈ 0.63662
Important correction
For the standard Buffon's Needle problem:
L = D
P = 2/π
not:
1/π
Short intuition
For an angle θ, crossing occurs when the center is close enough to a line:
distanceToLine
<=
(L / 2) × sin(θ)
Average this over all orientations and positions, giving:
2L / (πD)
14. Match a Small 2D Point Set Inside a Larger Set
Problem
Given:
small template S
large target T
Allowed transformation:
rotation
+
translation
No scaling.
Find the best alignment.
Case A: Correspondence Is Known
Suppose:
p[i] ↔ q[i]
We want:
q[i] ≈ R × p[i] + t
where:
R = rotation
t = translation
Algorithm:
1. Compute source centroid.
2. Compute target centroid.
3. Center both point sets.
4. Solve optimal rotation.
5. Compute translation.
Translation:
t = targetCentroid
- R × sourceCentroid
Rotation can be found with:
SVD
Kabsch algorithm
Case B: Correspondence Is Unknown
This is harder.
Rotation and translation preserve:
distances
angles
Use those properties to generate candidate matches.
Strong architecture
Small Template
│
▼
Compute invariant features
distances / angles
│
▼
Find candidate pairs
inside large target
│
▼
Infer rotation + translation
│
▼
Transform template
│
▼
KD-tree / spatial hash lookup
│
▼
Count matching points
│
▼
RANSAC best candidate
│
▼
Optional ICP refinement
RANSAC
Useful with noise and outliers.
1. Pick candidate anchors.
2. Infer transform.
3. Transform template.
4. Count inliers.
5. Repeat.
6. Keep best transform.
Pros
robust to outliers
easy to parallelize
easy interview explanation
Cons
probabilistic
may require many iterations
ICP
Iterative Closest Point:
initial transform
↓
nearest neighbors
↓
solve rigid transform
↓
repeat
Pros
excellent local refinement
Cons
can converge to local optimum
needs decent initialization
Interview recommendation
Invariant matching
→ RANSAC
→ KD-tree verification
→ ICP refinement
15. Seattle Rain + Three Friends
Setup
Probability of rain:
P(R) = 0.25
Probability of no rain:
P(!R) = 0.75
Each friend tells the truth with probability:
2/3
All three independently say:
"It's raining."
Find:
P(rain | all 3 say rain)
If it actually rains
Each tells the truth with probability:
2/3
All three say rain:
(2/3)³
=
8/27
If it does not rain
Each must lie:
1/3
All three say rain:
(1/3)³
=
1/27
Bayes calculation
Compare weighted likelihoods.
Rain:
P(R) × P(YYY | R)
= 1/4 × 8/27
= 8/108
No rain:
P(!R) × P(YYY | !R)
= 3/4 × 1/27
= 3/108
Normalize:
P(R | YYY)
= 8 / (8 + 3)
= 8/11
Answer
8/11 ≈ 72.7%
JavaScript
const rain = 0.25 * (2 / 3) ** 3;
const noRain = 0.75 * (1 / 3) ** 3;
const posterior = rain / (rain + noRain);
console.log(posterior);
// 0.72727...
16. Packing Equal Circles on an Infinite Plane
Clarify the problem
If circles may overlap and the question is simply:
Can circles cover the plane?
then:
100%
is possible.
But if the intended question is:
What is the maximum fraction of the plane occupied by equal, non-overlapping circles?
then this is the hexagonal circle-packing problem.
Result
Maximum density:
π / (2√3)
Equivalent:
π / √12
Approximate:
0.9069
or:
90.69%
JavaScript
const density = Math.PI / (2 * Math.sqrt(3));
console.log(density);
// 0.906899...
Intuition
Optimal centers form a triangular / hexagonal lattice:
○ ○ ○
○ ○
○ ○ ○
This packs circles more densely than a square grid.
17. 4×4 Grid of Points: How Many Squares?
Assume:
4 × 4 lattice of points
16 total points
Count:
axis-aligned
+
rotated squares
Axis-Aligned Squares
1×1
3 × 3 = 9
2×2
2 × 2 = 4
3×3
1 × 1 = 1
Total:
9 + 4 + 1
= 14
Rotated Squares
There are:
8
valid rotated squares.
Therefore:
14 + 8
= 22
Answer
22 squares
Probability Four Random Points Form a Square
Number of ways to choose 4 points from 16:
C(16, 4)
JavaScript:
function combination(n, k) {
let result = 1;
for (let i = 1; i <= k; i++) {
result *= (n - i + 1) / i;
}
return result;
}
console.log(combination(16, 4));
// 1820
There are:
22
sets that form squares.
Therefore:
P = 22 / 1820
Simplify:
11 / 910
Approximate:
1.21%
18. Find the Pattern in Number of Edges
The referenced image is missing, so the exact sequence cannot be solved.
But this is the framework to use.
Step 1: Write the sequence
E1, E2, E3, E4, ...
Step 2: First differences
ΔE1 = E2 - E1
ΔE2 = E3 - E2
...
If constant:
linear sequence
En = an + b
Step 3: Second differences
If first differences are not constant:
calculate second differences
Constant second difference often means:
quadratic
En = an² + bn + c
Step 4: Prefer structural counting
Instead of guessing a numeric pattern:
total edges
=
edges introduced
-
shared edges
Example: squares arranged in a row.
First square:
4 edges
Every additional square shares one side and therefore adds:
3 new edges
So:
En
=
4 + 3(n - 1)
=
3n + 1
JavaScript
function edgesForSquaresInRow(n) {
return 3 * n + 1;
}
Fast Review Sheet
┌─────────────────────────────┬─────────────────────────────────────────┐
│ Problem │ Key Answer │
├─────────────────────────────┼─────────────────────────────────────────┤
│ Regular hexagon │ s = sqrt(2A / (3√3)) │
│ Summer vs winter │ axial tilt + incidence angle + day │
│ Sphere 50% larger diameter │ 8 × 1.5³ = 27 lb │
│ 1 TB 1080p30 │ need bitrate; raw RGB ≈ 89 min │
│ Stone from boat │ water level falls │
│ $1000 @ 100% for 20 years │ $1,048,576,000 │
│ P(roll 3 with d6/d8) │ 7/48 │
│ P(d6 | rolled 3) │ 4/7 │
│ Expected next die roll │ 55/14 ≈ 3.93 │
│ Friday the 13th │ ~1/7; exact Gregorian = 43/300 │
│ 3×3×3 tic-tac-toe │ 49 winning lines │
│ Point-plane distance │ |Ax+By+Cz+D| / √(A²+B²+C²) │
│ Earth-Moon distance │ ≈ 384,400 km │
│ Expected max updates │ Hn ≈ ln(n) + γ │
│ Buffon's Needle L=D │ 2/π ≈ 0.637 │
│ Point-set matching │ RANSAC + KD-tree + ICP │
│ Seattle rain │ 8/11 ≈ 72.7% │
│ Hex circle packing │ π/(2√3) ≈ 90.69% │
│ 4×4 lattice squares │ 22 │
│ P(4 points form square) │ 11/910 ≈ 1.21% │
└─────────────────────────────┴─────────────────────────────────────────┘
Interview Strategy
For a quantitative problem, say your reasoning in this order:
Clarify
↓
Find invariant / formula
↓
Solve symbolically
↓
Substitute values
↓
Check units
↓
Check magnitude
↓
Explain intuition
Strong Clarification Examples
Video storage
Resolution and frame rate don't determine compressed storage by themselves. Should I assume raw RGB or a specific bitrate?
Circle problem
Do you mean covering, where circles may overlap, or packing equal non-overlapping circles?
Tic-tac-toe
I'll assume this is a 3×3×3 board where three aligned cells win, since that corresponds to 49 winning lines.
Interest
Should I assume the 100% interest compounds annually?
High-Value Concepts
1. Scaling Laws
Length:
L → kL
Area:
A → k²A
Volume:
V → k³V
Mass at constant density:
m → k³m
Memorize:
50% bigger diameter
does NOT mean
50% heavier.
Instead:
1.5 ** 3;
// 3.375
2. Bayes' Theorem
Conceptually:
posterior
∝
likelihood × prior
Full formula:
P(A | B)
=
P(B | A) × P(A)
----------------
P(B)
Useful mental model:
Prior
↓
Evidence likelihood
↓
Reweight possibilities
↓
Normalize
↓
Posterior
3. Expected Value
For discrete values:
E[X]
=
Σ value × probability
Example:
function expectedValue(outcomes) {
return outcomes.reduce((sum, { value, probability }) => sum + value * probability, 0);
}
4. Linearity of Expectation
Extremely useful:
E[X + Y]
=
E[X] + E[Y]
Independence is not required.
This is why the expected-max-update problem is easy:
E[updates]
=
P(update at 1)
+
P(update at 2)
+
...
+
P(update at n)
5. Harmonic Numbers
Hn
=
1 + 1/2 + 1/3 + ... + 1/n
Approximation:
Hn ≈ ln(n) + 0.577
Examples:
Math.log(1_000) + 0.577;
// ≈ 7.48
Math.log(1_000_000) + 0.577;
// ≈ 14.39
Math.log(1_000_000_000) + 0.577;
// ≈ 21.30
Huge input sizes can therefore still produce surprisingly small harmonic expectations.
6. Geometry Formulas Worth Knowing
Equilateral triangle
A = √3 / 4 × s²
Regular hexagon
A = 3√3 / 2 × s²
Sphere
V = 4/3 × πr³
Point-to-plane
|Ax0 + By0 + Cz0 + D|
d = -----------------------------
√(A² + B² + C²)
7. Circle Packing
Maximum equal-circle packing density:
π / (2√3)
≈ 0.9069
≈ 90.69%
Think:
hexagonal / triangular lattice
not:
square grid
8. Buffon's Needle
For:
L <= D
probability of crossing:
P = 2L / (πD)
Special case:
L = D
P = 2/π
≈ 63.7%
Common Interview Traps
Trap 1: Linear vs Cubic Scaling
Wrong:
diameter +50%
→
mass +50%
Correct:
diameter ×1.5
→
mass ×1.5³
→
mass ×3.375
Trap 2: Calculating Before Clarifying
Bad:
1080p30
→ immediately calculate disk usage
Better:
"What bitrate or encoding should I assume?"
Interviewers often intentionally leave information out.
Trap 3: Weight vs Volume Displacement
Stone inside boat:
displacement based on weight
Stone underwater:
displacement based on physical volume
That distinction determines the answer.
Trap 4: Forgetting Bayesian Updating
Before observing a 3:
P(D6) = 1/2
P(D8) = 1/2
After observing a 3:
P(D6 | 3) = 4/7
P(D8 | 3) = 3/7
The probabilities changed because a 3 is more likely on the smaller die.
Trap 5: Trusting the Supplied Answer
If an interview prompt says:
Buffon's Needle answer = 1/π
do not blindly accept it.
Standard assumptions give:
2/π
State your assumptions and derive the result.
60-Second Mental Math Sheet
√3 ≈ 1.732
π ≈ 3.14
2/π ≈ 0.637
1/π ≈ 0.318
ln(10) ≈ 2.303
2¹⁰ = 1024 ≈ 10³
2²⁰ = 1,048,576 ≈ 10⁶
Useful scaling:
1.5² = 2.25
1.5³ = 3.375
2³ = 8
10³ = 1000
Useful physical values:
Earth radius
≈ 6400 km
Earth → Moon
≈ 60 Earth radii
≈ 384,000 km
Speed of light
≈ 300,000 km/s
Earth → Moon light time
≈ 1.28 sec
Final Interview Cheat Pattern
When you see a math or physics question, think:
┌─────────────────────┐
│ What is unspecified?│
└──────────┬──────────┘
↓
┌─────────────────────┐
│ What stays invariant?│
└──────────┬──────────┘
↓
┌─────────────────────┐
│ What scaling law or │
│ formula applies? │
└──────────┬──────────┘
↓
┌─────────────────────┐
│ Solve symbolically │
└──────────┬──────────┘
↓
┌─────────────────────┐
│ Plug in numbers │
└──────────┬──────────┘
↓
┌─────────────────────┐
│ Check units and │
│ order of magnitude │
└──────────┬──────────┘
↓
┌─────────────────────┐
│ Explain intuition │
│ in one sentence │
└─────────────────────┘
The goal is not just:
get the answer
The goal is to demonstrate:
clarification
+
modeling
+
reasoning
+
sanity checking
+
clear communication