Google面试题; 摔碎的鸡蛋

发布: 2012-03-04 21:35

英文原题:
You are given 2 eggs.
You have access to a 100-storey building.
Eggs can be very hard or very fragile means it may break if dropped from the first floor or may not even break if dropped from 100th floor.Both eggs are identical.
You need to figure out the highest floor of a 100-storey building an egg can be dropped without breaking.
Now the question is how many drops you need to make. You are allowed to break 2 eggs in the process

无责任翻译:
给你两鸡蛋,你面前有一座一百层的楼。假设鸡蛋可以很脆弱,从一楼扔下去都能碎;也可以是超人鸡蛋,从100层扔下去也不碎。再假设两个鸡蛋是一摸一样的。现在问从100层建筑范围内丢这两个鸡蛋,需要丢几次能找出这两个鸡蛋最高从哪一层丢下去不会碎。你可以在尝试的过程中把两个鸡蛋都打碎。


原文: http://qtchina.tk/?q=node/634

Powered by zexport