FDEInterviews logoFDE/Interviews
Coding & DSA / 88
mediumGoogleMetaTwo Sigma

Given a biased coin, produce a fair coin flip

You have a coin that lands heads with some unknown probability p. Build a fair 50/50 flip from it without knowing p. The von Neumann trick is two lines; the part that scores is explaining why the bias cancels and how many flips it costs.

Updated Aug 2026 · Grounded in real Forward Deployed Engineer interview loops and written to a senior-engineer editorial bar.

You have a coin that lands heads with some unknown probability p. Build a fair 50/50 flip from it without knowing p. The von Neumann trick is two lines; the part that scores is explaining why the bias cancels and how many flips it costs.

Unlock the other 466 answers · ₹2,000 / $25Your progress and mastery stay saved · 6 months · one payment · no auto-renew
UP NEXT ON YOUR JOURNEY
FEDITOR'S NOTE

This is a reasoning screen wearing a coding disguise. The interviewer is listening for the symmetry argument that P(HT) = P(TH), and the honest follow-up is the expected number of flips, which blows up as p approaches 0 or 1. Candidates who reach for entropy-extraction tricks before nailing the basic argument usually overcomplicate it.

DISCUSSION · 0

No comments yet — be the first to share your approach.