http://www.docin.com.sixxs.org/p-6473837.html
World Quant 面试题-4
Question:
一条东西向长街,你站在街中间,街北是一排门,你有一把钥匙,请写出一种策略,要求X/N在最坏情况下最少,X为你到达正确的门时所走的总路程,N为正确的门距原点的距离,可以假设门与门之间距离为1。
Definition:
1. There are 2*m houses in all
2. X is total distance traveled when open the rightdoor
3. N is distance from right door to middle point
4. Regard distance from middle point to the two nearbyhouses as 1, though it should be 0.5. This does not affect the result.
Solution #