《数据科学面试40+真题讲解》,K神本年度最后一次开课


一亩三分地论坛

 找回密码
 Sign Up 注册获取更多干货
码农求职神器Triplebyte:
不用海投,内推你去多家公司面试
Airbnb 数据科学职位
in analytics and inference
天天打游戏、照样领工资,
你要不要来?
把贵司招聘信息放这里
查看: 920|回复: 0
收起左侧

Square面经

[复制链接] |试试Instant~ |关注本帖
haifengc 发表于 2015-10-21 10:29:49 | 显示全部楼层 |阅读模式

2015(10-12月) 码农类 博士 全职@Square - 网上海投 - 技术电面 |Failfresh grad应届毕业生

注册一亩三分地论坛,查看更多干货!

您需要 登录 才可以下载或查看,没有帐号?Sign Up 注册获取更多干货

x
Let's implement the Monty Hall problem from Let's Make a Deal, with an arbitrary number of doors.  In this game show, there are n doors – we'll take this as a parameter.  Behind one of them is a fabulous prize (a car), and behind the others are worthless items (goats).  To start, the player will pick one of the doors – this is our second parameter. This door is not opened. Then the host will reveal a goat behind another door, continuing until there are only two doors still closed: one the contestant first chose and one other.  The host only reveals goats, never reveals the door the player has chosen, and stops when there are only two doors left (the one the player has chosen and one other).  Then the host offers the player a choice: either keep their current door or switch to the other closed door – this choice is our last parameter.  Then the host reveals what's behind the chosen door, and the player either wins a fabulous prize or a goat.  We'll start with simulating a single game, taking an arbitrary number of doors..1point3acres缃

评分

2

查看全部评分

本版积分规则

关闭

一亩三分地推荐上一条 /5 下一条

手机版|小黑屋|一亩三分地论坛声明

custom counter

GMT+8, 2017-11-18 09:23

Powered by Discuz! X3

© 2001-2013 Comsenz Inc. Design By HUXTeam

快速回复 返回顶部 返回列表