Logo

Question preview

Three-square-problem

What this preview is

About this preview

Three-square-problem is a medium quant interview question on puzzles.

Unlock full access to getcracked

Join to unlock this question, detailed solutions, and our complete library of quant finance interview prep.

What this number-theory puzzle tests

This is a medium-difficulty constraint-satisfaction problem that appears in quant interview rounds to assess how you handle systematic search and algebraic reasoning under pressure. You are given three pairwise sums and told they must all be perfect squares; the challenge is finding positive integers that satisfy all constraints simultaneously while minimizing the total.

Strong approaches involve either setting up a parametric system (expressing the unknowns in terms of the square roots) or conducting a structured numerical search with pruning heuristics. The problem rewards both mathematical insight—recognizing which parameterizations reduce the search space—and disciplined casework to avoid dead ends.

  • Parameterizing systems of Diophantine constraints
  • Parity and divisibility arguments to eliminate candidates
  • Systematic enumeration and lower-bound reasoning