GoQuant 图解量化面试每日一题:2-Burning Ropes
原题(绿皮书 Ch2 Brain Teasers)
You have two ropes, each of which takes 1 hour to burn. But either rope has different densities at different points, so there's no guarantee of consistency in the time it takes different sections within the rope to burn. How do you use these two ropes to measure 45 minutes?
中文题意
你有两根编子,每根烧完恰好1小时,但密度不均匀,烧一半长度不等于过了半小时。如何精确测量45分钟?
解答
核心洞察:一根绳子两头同时点燃,无论密度如何,一定30分钟烧完。速度×2,时间÷2。
操作步骤:
t=0:绳A点熔两始,绳B只点燃一端,同时开始。
t=30min:绳A烧完。立刻点燃绳B的另一端。
t=45min:绳B烧完。剩余30min的量两头烧,15min烧完。
答案:30+15=45分钟。
#量化面试 #Quant #BrainTeaser #逆向思维 #创造性思维
