Door to Offer
Table of Contents
A Practical Guide To Quantitative Finance Interviews 收录了一些量化面试中的经典题目. 本文介绍的是来自第二章的「Door to Offer」.
Door to Offer #
Problem #
You are facing two doors. One leads to your job offer and the other leads to exit. In frontof either door is a guard. One guard always tells lies and the other always tells the truth.You can only ask one guard one yes/no question. Assuming you do want to get the job offer, what question will you ask?
Solution #
利用嵌套问题来解决. 随便找一个卫兵, 问他: “如果我问你这扇门是否通往 Offer, 你会回答 ‘是’ 吗?” 如果回答是 ‘是’ , 那么这扇门通往 Offer, 否则不通往 Offer.