全部版块 我的主页
论坛 提问 悬赏 求职 新闻 读书 功能一区 经管类求职与招聘
24061 8
2011-01-25
面试题来自Jane Street Capital,在香港有分公司,总部在NYC,很牛逼的公司。下面分享两道经典面试题:
1. You have 3000 apples at Edingburgh want to transfer as many apples as you can to London. You have a truck, the maximum capacity of which is 1000 apples. London is 1000 miles away from Cambridge and when the truck is carrying apples, for every mile it drives, it will drop one apple. What is the maximum number of apples you can deliver to London?


Answer:
1) In three separate trips, we will transfer the 3000 apples to our first stopping point. At the first stopping point, we want to have as close to 2000 apples as possible. This way, when we start moving again, we have as close to 1000 apples as possible in our truck.
This leads us to solving: 3000-3*x=2000 => x~333.33 miles (round up to 334), where x is the distance in miles we travel to the first stopping point. Note that we multiply 'x' times 3 since we are taking the apples in three separate runs. After truckin' the 3000 apples, in three separate runs, 334 miles, we have 3000-3*334=1998 apples left and 666 miles left to go.

2) At the second stopping point, we want to have as close to 1000 apples as possible. This way, when we start moving again, we have as close to 1000 apples as possible in our truck. This leads us to solving: 1998-2*y=2000 => y=499, where y is the first stopping point. Note that we multiply 'x' times2 since we are taking the apples in two separate runs. Now, we have 1998-2*499=1000 apples left and 167 miles left to go.
3) We then load up the truck with a 1000 apples and travel 167 miles. At the end, we have 1000-167=833 apples



2. 抛一个10个面的dice,数字分别为1-10。记下每次抛后的面值并做累加,一旦总和超过100则停止。请问最终最有可能得到的总和值为多少?


Answer: 我用Monte-Carlo仿真计算结果为104,但不知理论解法如何。有高人指点否?

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2011-2-10 05:45:33
1# mmxmw
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2011-2-10 05:49:04
1# mmxmw expectation  is 5.5on average, need 19 times to be over 10019*5.5 is 104.5the the average sum is 104- 105
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2011-10-4 02:07:59
晕,搞什么MonteCarlo和expectation,越复杂越错。答案不就是101 吗。加1 就可以了。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-10-13 14:36:24
今年的题目是40匹马赛马的问题。。。难。。。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2014-8-30 05:03:19
无意中看到了。试一下dice的。。
在超过100之后,我们能得到的有101,102...109,110.
得到109的概率大于110,因为109=100+9=99+10, 而110=100+10,

因此109是100的概率x9的概率。  110是100的概率x10的概率,

而9的概率和10的概率都是1/10。

所以pr(100)*pr(9)=pr(100)*pr(10), 这就说明109的概率大于100的概率。(因为得到99+10的概率是正的!)

以此类推,109<108<107...<101
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群