The scale that holds only ten bolts
A workshop has five boxes of bolts. Good bolts weigh exactly 20 grams. One box is full of bolts from a bad batch that each weigh 21 grams; every other box is good. You have a digital scale that shows an exact reading, but you may read it only once, and the scale's tray is small: it holds at most ten bolts.
The usual trick is to take 1 bolt from box 1, 2 from box 2, and so on up to 5 from box 5. That needs 15 bolts, which do not fit.
Find the bad box with a single reading.
Show a hint
Do you really need to take a bolt from every box? What does it mean if the reading shows no excess at all?
Your answer
Solving needs a free account
Answers, streaks and solutions unlock when you are signed in. Reading the question and the hint stays free.
Discussion
💡 Discussion rules
- No full solutions here. Hints and approaches only.
- Complexity, edge cases and intuition are the point.
- Interview experiences are welcome. Respect your NDAs.
Loading discussion…
Learn the concepts
The theory behind this question.