10 Mice, 1000 Bottles, and the Binary Trick That Exposes CRUD-Only Backend Engineers
The question is a fast proxy for whether a backend candidate internalizes bitwise reasoning and space-time tradeoffs. Engineers who can't map a set of binary states onto a lookup problem will struggle with bitmaps, Bloom filters, and the kind of compact data structures that keep high-scale systems from falling over.
The classic puzzle — one poisoned bottle hidden among 1,000, with mice that die exactly one hour after drinking — has a precise answer: 10 mice. Each bottle gets a 10-bit binary label. A mouse drinks from a pool containing a drop of every bottle whose nth bit is 1. After the poison takes effect, the pattern of dead mice reads out as the binary index of the poisoned bottle. 2^10 = 1024 states, which covers all 1,000 bottles with room to spare.
ByteDance and other large Chinese tech firms use this question to filter for engineers who understand information density, not just procedural logic. The setup mirrors a bitmap or Bloom filter: a tiny bit array encodes membership across a large set. Ten bits resolve 1,000 possibilities in one parallel round, trading a small amount of space for zero additional time.
The trap answer is 20 or some linear-search count. The right answer signals that the candidate thinks in state-space compression and bitwise operations — the same instincts that separate engineers who build high-throughput systems from those who only write CRUD wrappers.
The question functions as a quick classifier: a candidate who defaults to linear search reveals they don't reach for binary encoding as a first instinct, which is a red flag for roles that involve high-throughput data structures.
Many experienced backend engineers who live in high-level frameworks lose fluency with bitwise operations; this puzzle exposes that gap in minutes.
The setup is isomorphic to a Bloom filter with no false positives — each bottle maps to a unique bit pattern, so the 'filter' is actually a perfect hash.
I don't get it. One mouse is clearly enough. Just let one mouse keep testing the poison. It'll die when it drinks the poisoned one. There's only one poisoned bottle, so once it hits it, you just eliminate that one. It's a bit like asking a PhD whether rain falling from ten thousand meters would kill someone. A bunch of PhDs are busy calculating, but they're outdone by a cleaning lady asking, "Haven't you ever been rained on?"
Don't ask me if the efficiency would be terrible, because I feel sorry for the mouse [innocent-dumb]
Haha, this kind of problem should also have time or attempt limits, otherwise the question is actually meaningless