WalzoneInterview Prep
📞 Interviewing soon? Practice with a realistic AI mock phone interview — it calls you, then scores you. First 15 min FREE →

Wall Street Quant · Puzzles & Problems · question 35 of 155

You have 1000 bottles of juice. One contains poison and the others do not. The poison is lethal and will kill anyone who ingests even a tiny amount. You have 10 lab rats to test the bottles. How can you find out which bottle contains poison?

📕 Buy this interview preparation book: 155 Wall Street Quant questions & answers — PDF + EPUB for $5

Let’s use binary numbering to uniquely represent each bottle using the 10 lab rats. That is, we will represent each bottle with a 10-digit binary number, where each digit corresponds to the action of a specific lab rat. A ‘0‘ indicates that the rat doesn’t drink from the bottle, and a ‘1‘ means that it does drink.

For example, consider the following arrangement for the first few bottles:

Bottle 1: 0000000001
Bottle 2: 0000000010
Bottle 3: 0000000011
Bottle 4: 0000000100
...
Bottle 1023: 1111111111

With this approach, if we feed the rats according to their binary number in this arrangement and carefully observe the outcomes, we will be able to disentangle the results unambiguously in one go.

For example, let’s say rat 1, rat 3, and rat 6 die. In this case, the binary number corresponding to this configuration is ‘0101000001‘. Converting the binary number to its decimal representation, we find that the poisoned bottle was number 321 (take note that the binary numbers start from 0, so we need to add 1 to reach the correct bottle number).

This method is efficient and allows us to identify the poisoned bottle with certainty. In this case, utilizing 10 lab rats allows us to examine up to 210 − 1 = 1023 bottles, which is more than enough to test all 1000 bottles.

Reading is step one. Saying it out loud is the interview. Our AI interviewer calls your phone and runs a realistic Wall Street Quant interview — then scores it.
📞 Practice Wall Street Quant — free 15 min
📕 Buy this interview preparation book: 155 Wall Street Quant questions & answers — PDF + EPUB for $5

All 155 Wall Street Quant questions · All topics