2 ms·
This, of course, is a popular interview question, albeit asked with eggs (or bowling balls) instead of cats. Here's a discussion and a solution: http://20bits.c
by Jun8 16y ago
This, of course, is a popular interview question, albeit asked with eggs (or bowling balls) instead of cats. Here's a discussion and a solution: http://20bits.com/articles/interview-questions-two-bowling-balls/ http://20bits.com/articles/interview-questions-two-bowling-b.... I think for m balls and N floors, the number of steps is O(N^(1/m)).
- cperciva 16y agoI think for m balls and N floors, the number of steps is O(N^(1/m)). Almost right. It's O(m N^(1/m)).