3 ms·
I agree here. My first thought was that you optimize for the two floors and forget about most of them. One of the best skills you can have when solving real wor
by JunkDNA 14y ago
I agree here. My first thought was that you optimize for the two floors and forget about most of them. One of the best skills you can have when solving real world problems is to recognize when they're specifically not general case math problems and take the appropriate short cuts. If it weren't an egg, it would be a different story. But the problem specifically says it's an egg. Not a bowling ball or a chair or any other semi-resilient object that could survive an arbitrary fall. Details like that matter.
- chmike 14y agoExactly my thought. This could have been a test of over analysis. Though he wrote it should be considered as a simple mah problem and nothing more,
- habidasher 14y agoThat was my first thought as well. My answer would have been something along the lines of, "Given my domain knowledge of eggs and sidewalks, I can estimate that the egg will survive a fall of at most zero or one stories. Therefore the best algorithm is a linear search starting from the 0th floor."