interview prep

The logic puzzles quant firms ask that Google banned

Google killed the brainteaser in 2013. Laszlo Bock, who ran hiring there, called the puzzles “a complete waste of time” that “don’t predict anything” and mostly make the interviewer feel smart. Most of tech took the hint. Quant shops did not. Jane Street, SIG, Optiver, and IMC still open with these problems, because a trader spends the day making decisions under uncertainty and defending them out loud in seconds, which is the thing a good puzzle measures.

The number you land on matters less than the reasoning you narrate to reach it. An interviewer watching you fumble toward the answer with clean logic takes you over someone who blurts a memorized result and goes silent. The puzzles below keep recurring, and they reduce to a small set of tricks that outlast the wording.

Timing with tools that lie to you

You have two ropes. Each burns end to end in exactly 60 minutes, but unevenly, so half a rope is not half an hour. Measure out 45 minutes. The move is to burn from both ends at once. Light rope A at both ends and rope B at one end together. Rope A is gone in 30 minutes no matter how uneven it is, because the two flames cover the whole length between them. The moment A dies, light B’s second end. B had 30 minutes of rope left, and from both ends it finishes in 15. Thirty plus fifteen is 45. Lighting both ends halves whatever time remains, and that halving is your unit of measurement.

Find the invariant and the puzzle collapses

Cut two diagonally opposite corners off a chessboard. Can you tile the remaining 62 squares with 31 dominoes? People burn ten minutes trying arrangements. The answer is no, and the proof is one sentence. Every domino covers one white and one black square. The two removed corners share a color, so the board now has 32 of one color and 30 of the other, and no set of one-white-one-black dominoes can cover an uneven split. Color is the invariant.

Same idea, different costume: 100 lockers, all closed, person 1 toggles every locker, person 2 every second, person 3 every third, up to 100. Which end open? A locker is toggled once per divisor of its number, and only perfect squares have an odd number of divisors, since divisors pair up except the square root. Lockers 1, 4, 9, on up to 100 stay open. Ten of them.

The ant question hides the same shortcut. A hundred ants sit on a one-meter stick, each facing left or right at random, all walking one centimeter per second, and when two collide they reverse. When an ant reaches an end it falls off. How long can the stick stay occupied? Tracking individual ants is hopeless, but two identical ants bouncing off each other is indistinguishable from two ants passing through each other. Treat every collision as a pass-through and each ant marches straight off its own end. The worst case is one ant crossing the full length, which takes 100 seconds.

You are weighing information, not objects

The twelve-ball problem sorts people who guess from people who count. Twelve identical balls, one fake that is either heavier or lighter, a balance scale, three weighings: find the odd ball and its direction. Each weighing has three outcomes, so three give 27 distinguishable results, and you need to cover 12 balls times 2 directions, or 24 cases. It fits, barely, which is the signal that every weighing has to cut the possibilities into rough thirds. Weigh four against four first; whether it balances tells you which group holds the fake, and relabeling over the next two weighings pins it down. Interviewers want the counting argument up front, not a lucky first split.

The poisoned wine problem is the cleanest information puzzle there is. A thousand bottles, exactly one poisoned, the poison kills in 24 hours with no other symptom, and you have one day. How many test subjects? Ten. Number the bottles 0 to 999 in binary, ten bits wide, and subject i sips from every bottle whose i-th bit is 1. A day later the pattern of who died reads off as a binary number, and that is the poisoned bottle. Ten subjects cover 1024 bottles.

Two more come up constantly. Twenty-five horses, five to a race, no stopwatch, find the fastest three in seven races, reusing earlier finishes to drop horses that already lost to three faster ones. Two eggs and a 100-floor building, find the highest safe floor in fourteen worst-case drops, using shrinking gaps (14, then 27, then 39) so a broken egg leaves just enough single-floor checks below.

Start from the last move and walk back

Five pirates, ranked by seniority, split 100 gold coins. The senior proposes a division, everyone votes, and if at least half approve it passes; otherwise he goes overboard and the next proposes. Pirates are perfectly rational and, given equal gold, prefer to throw someone overboard. What does the top pirate propose? Solve the end first. With two left, the senior keeps all 100 and votes for himself. Knowing that, the third-from-bottom can buy the lowest pirate for one coin, since that pirate gets nothing in the two-man endgame. Carry the logic up and the top pirate lands on 98 for himself, nothing for the second, one coin each for the third and fifth: 98, 0, 1, 0, 1. He needs only two bought votes plus his own.

The two-guards riddle is the compressed version of the same reasoning. Two doors, one safe and one deadly, two guards, one who always lies and one who always tells the truth, and you get a single question. Ask either, “Which door would the other one tell me is safe?” then pick the opposite. The truth-teller faithfully reports the liar’s lie, the liar misreports the truth-teller’s true answer, and both paths point at the deadly door, so you invert.

Let common knowledge do the work

The blue-eyes island is the hardest classic and worth knowing cold. A hundred islanders have blue eyes and the rest brown, nobody knows their own color, and anyone who deduces theirs must leave that night. A visitor announces, “at least one of you has blue eyes.” Everyone already knew that, so why does anything change? The statement makes it common knowledge, and induction takes over. One blue-eyed person would leave the first night. Two would each wait a night, see the other stay, and both leave the second. Push it to a hundred and all leave on the hundredth night. The visitor added no fact, only shared certainty.

A gentler cousin: 100 prisoners in a line, each in a red or blue hat, each seeing every hat ahead but not their own. From the back, each says one color to survive, and they may plan beforehand. The prisoner at the back says “red” if the red hats he sees are odd in number and “blue” if even. He might be wrong about his own hat, but everyone ahead tracks the running parity and deduces their color exactly. Ninety-nine saved for certain, one coin flip at the back.

Conditioning is where the intuition breaks

Monty Hall never stops being asked, because most people get it wrong first and some argue after being shown. Three doors, a car behind one, you pick door 1, and the host who knows the layout opens door 3 on a goat and offers a switch. Switching wins two times in three. Your first pick was right a third of the time, so the other two thirds now sits entirely on the door the host left closed.

The boy-girl problem trips careful people too. A family has two children and at least one is a boy; what is the probability both are boys? Not one half. The equally likely families with at least one boy are boy-boy, boy-girl, and girl-boy, and only one of those is two boys, so one third. The phrasing drives the number, which is what the interviewer is probing.

Expected-value questions are the trader’s home turf. Flip a fair coin until you first see heads twice in a row: the expected number of flips is 6. Flip until heads then tails: the expected number is 4. Identical-looking, different answers, because the person hunting heads-heads can throw away progress on a tails and restart, while the person hunting heads-tails never wastes a stray heads, it just becomes the new start. Explaining why the two differ is the thing being tested.

One doubles as a mental-math check: roll a die up to three times, keep your final roll, play optimally, and your expected take is 14/3, about 4.67. On the first roll you keep a 5 or 6 and reroll anything lower, because the two rolls you would have left are worth 4.25; on the second the bar drops to 4; on the last you take whatever comes. Hand someone a biased coin and ask for a fair result, and the move is to flip twice: heads-then-tails is one outcome, tails-then-heads the other, and any matching pair you discard and repeat. The two mixed sequences have equal probability whatever the bias.

Puzzle Pattern it tests The move that cracks it Answer
Two 60-minute ropes, uneven burn Timing with imperfect tools Burn a rope from both ends to halve the time left Measure 45 minutes
Chessboard with two opposite corners removed Coloring invariant Removed corners share a color; dominoes need an even split Impossible to tile
100 lockers toggled by every divisor Divisor parity Only perfect squares have an odd number of divisors 10 open (1, 4, 9, … 100)
100 ants on a 1-meter stick, collisions reverse Collisions as pass-through Bouncing identical ants equals ants walking through each other 100 seconds, worst case
12 balls, one heavier or lighter Information counting 3 weighings give 27 outcomes for 24 cases; split in thirds 3 weighings
1000 bottles, 1 poisoned, one day Binary encoding Each subject drinks the bottles with a given bit set 10 subjects
5 ranked pirates split 100 gold Backward induction Solve the two-pirate endgame, then walk up 98, 0, 1, 0, 1
Two guards, one always lies Self-referential question Ask what the other would say, then pick the opposite door One question is enough
100 blue-eyed islanders, a visitor speaks Common knowledge A public statement starts a 100-night induction All leave on night 100
100 prisoners guessing hat colors in a line Parity signal The back prisoner announces the parity of red hats 99 saved for certain
Monty Hall three doors Conditional probability The host’s reveal shifts 2/3 onto the unopened door Switch, win 2/3
Flips until HH versus until HT Expected value over states HH can waste a heads and restart; HT never does 6 flips vs 4 flips

If you are prepping for a prop shop, the pattern column matters more than the puzzle column. There are maybe six ideas on this page, invariants, information counting, backward induction, common knowledge, conditioning, and expected value, and almost every “new” puzzle is one of them in a fresh disguise. The classics are all online, so interviewers twist the numbers to see whether you reach for the right idea or just recite an answer. Practice a few dozen out loud, narrating each step to an empty room, and the twist stops being scary.

newsletter

What's actually being asked right now

Interview patterns & comp trends, straight to your inbox.

No spam. Unsubscribe anytime.

newsletter

What's actually being asked right now

Interview patterns & comp trends, straight to your inbox.

No spam. Unsubscribe anytime.

1972 Soviet postage stamp commemorating the Mars 2 probe

worth a read

Mars For The Rest of Us — a weekly-or-more deep dive on the technical side of Mars exploration: rocket propulsion, microbiology, mission architecture, and everything in between. Written by Maciej Ceglowski.

Read it on Substack →
Scroll to Top