Optimizing on the number of days to find a poisoned cookie

Viewed 127

A friend of mine was asked this question for an interview and couldn't solve it at that moment. Thought I would share the same.

There are a thousand choco-chip cookies with one of them poisoned. You have access to 10 lab rats per day. Each rat can nibble on any number of cookies and each cookie can be nibbled by any number of rats. After a rat nibbles on a poisoned cookie, it takes a day to see the after effects on the rat if it were poisoned.

Optimize on the number of days. I was able to come up with an algorithm to find the poisoned cookie in 2 days, although I believe there exists a way to do this in 1 day

2 Answers
Related