|
|
|
|
|
by Clubber
2955 days ago
|
|
Uh, if you drop an egg out of the first floor window onto cement, it will break. The answer should be a form of binary search, but since you only have two eggs, you'd have to do a sequential search from the bottom floor. You have one chance at a mistake, so I would almost say start with the 2nd floor, but I know it will break on the first floor. I don't see how that in any way gauges programming what so ever. |
|
yeah, sorta. essentially you partition the 100 floors into some number of groups (i forget what partition length is optimal) and drop the first egg at each segment until it breaks, then go linearly from the previous one