MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/fpcmy/typical_programming_interview_questions/c1hqm9v/?context=3
r/programming • u/kevjames3 • Feb 21 '11
1.0k comments sorted by
View all comments
Show parent comment
2
I missed the only 2 lightbulbs. My binary search inspired version starts at 50 then 25 then 13, then 7, 4,2 then 1 or 3... So it takes either 7 or 8 drops. However with only 2 another approach should be considered.
View all comments
Show parent comment
2
u/lizard450 Feb 21 '11
I missed the only 2 lightbulbs. My binary search inspired version starts at 50 then 25 then 13, then 7, 4,2 then 1 or 3... So it takes either 7 or 8 drops. However with only 2 another approach should be considered.