Menu

Earn Premium with Referrals

Invite your friends and earn Premium rewards through our referral program.

See how it works and start inviting friends.

Missing Dollar Puzzle
INTERVIEWPUZZLE

Missing Dollar Puzzle

Understand the misleading arithmetic behind the missing-dollar puzzle and identify the incorrect comparison.

The Puzzle: Three friends check into a hotel. The room costs 30,sotheyeachpay30**, so they each pay **10.

  • Later, the clerk realizes the room was only $25.
  • He gives $5 to the bellboy to return to the friends.
  • The bellboy, not knowing how to divide 5bythree,decidestogive5 by three, decides to give **1** to each friend and keeps $2 for himself.

The Deception:

  • Each friend paid 10andgot10 and got 1 back, so they each paid $9.
  • Total paid = 9 × 3 = $27.
  • The bellboy kept $2.
  • 27+27 + 2 = $29.
  • Where is the missing $1?

1. The Flaw in the Logic

The mistake is in adding the 2tothe2 to the 27.

  • The $27 is what the friends spent.
  • Inside that 27,27, **25** is with the hotel and $2 is with the bellboy.
  • The **3theygotbackmakesthefull3** they got back makes the full 30.

2. Correct Equation

  • Total Paid (27)=Hotel(27) = Hotel (25) + Bellboy ($2).
  • You shouldn’t add the 2tothe2 to the 27; you should subtract it to see where the money went!

Interview-Focused Questions

Q: Why do people get this wrong so easily?

A: Because the puzzle frames the question in a way that creates a “false sum”. By directing your attention to 27+2=2927 + 2 = 29, it hides the fact that the 2isalreadypartofthe2 is already part of the 27. It’s a classic test of Auditory/Logical Persistence.

Q: Is this relevant to debugging?

A: Yes. In software, “Off-by-one” errors or “Double counting” errors happen exactly like this—when you add a value to a set that already contains it.

Key Takeaway

Always verify the Direction of Flow. Money (or data) must always balance out if you follow the “Source” and “Sink” correctly.

My Private Notes

Notes are auto-saved locally to this device.