You have 4 bottles of milk. One of them is poisonous while the other 3 are non-poisonous. There is a rat which dies exactly after 10 hours of drinking the poisoned bottle. You have a clock that measures time only in hours. Suggest an optimal strategy to identify the poisoned bottle within 24 hours.
At the beginning of the first hour feed the rat the Ist bottle. At the start of 2nd-hour feed, the 2nd one and
similarly at the start of 3rd-hour feed, the 3rd bottle. If the rat dies after exactly 10 hrs, the first bottle
is poisonous. If it dies after 11 hours, 2nd one contains poison else the 3rd one is poisonous. In this way,
after exactly 12 hours you would be able to determine the poisonous bottle.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.