[八我司] 介绍一下Uber tech stack和各个大组的情况

一亩三分地论坛

 找回密码
 Sign Up 注册获取更多干货
E轮2.5亿美元融资
K12教育独角兽一起作业
北京-诚聘人工智能/教育/大数据岗
坐标湾区
Games Startup
招聘游戏开发工程师
游戏初创公司招聘工程师、UIUX Designer和游戏策划
码农求职神器Triplebyte:
不用海投
内推多家公司面试
把贵司招聘信息放这里
查看: 1459|回复: 2
收起左侧

Microsoft college code competition

[复制链接] |试试Instant~ |关注本帖
3angFeng945 发表于 2014-10-2 12:02:25 | 显示全部楼层 |阅读模式

2014(10-12月) 码农类General 硕士 全职@Microsoft - 校园招聘会 - 校园招聘会  | Fail |

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

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

x
今天刚参加完微软career fair后的microsoft college code competition,虽然官方只说有奖品啥的,但是好像答的好会直接有interview,所以po在这个版,不知道合不合适。

一共六道题,难的三分,简单的一分,中等的两份,可以三个人组队参加,用任意语言,要把最终结果和代码上传,结果对就会给分。. 1point 3acres 论坛
第一题是三分题,有一种病毒,但是疫苗有限,要先给得病的概率高的人免疫,所以要计算得病概率,得病的概率是个人的基因跟病毒基因比较,看重复部分的长度有多长,跟总长度比较。输出接种的次序。
第二题两分题,忘记了,
第三题两分,是unicode的一道题,不是太熟,就没做这个。
第四题两分,是用software实现vending machine, 感觉corner case挺多的。
第五题一分,是给出一个txt文档,每一行有两个字符串,判断他俩是不是anagram,并输出。这个记得career cup上有非常类似的题。当然实际做的时候输入输出的函数要自己写。. more info on 1point3acres
第六题一分,给出一段代码,有go to和next等命令,判断是否有死循环,compiler里的经典方法。

本人很水~得分不是很高,他这个下周在别的学校好像还有,感兴趣的小伙伴赶紧组队参加吧。
隐藏部分是第一个题的原题,感兴趣的同学可以看一下。
There is an outbreak of VirusX in Redmond. The local authorities have discovered a vaccine that protects against infection by VirusX. However, they can only produce so many vaccines per week. Your job is to figure out the best order in which people should be vaccinated. Everyone will get vaccinated, but the people more likely to be sick should be vaccinated first. You are more likely to get sick if the virus` DNA closely matches somewhere in your DNA.

However, there is a catch: the virus can mutate. Over time, the virus can “cut” letters from its DNA. So it is possible that the AAAAG virus mutates into the AAAG, AAAA, …, A viruses. Removing letters is the only possible mutation: the virus cannot change any letter.

For example, if your DNA is GGGGGGGAAAAGGGGGG and the virus DNA is AAAAG, you have 1.0 probability of getting infected because all of the letters of the virus are found in the same order in your DNA. If your DNA was TTTTTTTAAAATTTTTT, then the virus only partially matches your DNA. For partial matches, we define the probability to get sick by the numbers of continuous letters of the virus’ DNA that matches your DNA divided by the total number of letters in the un-mutated virus’ DNA. With the example above, AAAA is the longest possible mutation that matches in your DNA, so your probability of getting sick is len(AAAA) / len(AAAAG): 0.8.

You are provided with the DNA of every inhabitant of Redmond and the virus’ DNA. For every inhabitant, you need to output the order in which he/she should get vaccinated. Everyone that has the same probability to get sick should get vaccinated in the same batch. For example, the order of vaccination for inhabitants with the following probability to get sick: [0.0, 0.5, 0.5, 0.0, 1.0] is: [3, 2, 2, 3, 1].

Tip.1point3acres网

Here is a tip for how to get from the “Canonical Sample Input” to “Canonical Sample Output” (described below). Given the TAAT virus and its highest infection score possible mutation for persons 0 to 4, here are the longest matching mutations and the attached probability to get sick for every person:. more info on 1point3acres
. 围观我们@1point 3 acres
Person #0: T, 0.250
Person #1: TAA, 0.750
Person #2: TT, 0.500
Person #3: TAAT, 1.000
Person #4: TA, 0.500
Therefore, person 3 has a 1.0 probability of getting sick, so he or she gets vaccinated first. Person 1 is the next highest, so he or she gets vaccinated second. We continue to vaccinate in batches of probability of getting sick, with person 0 getting vaccinated last because he or she has the least probability to get sick.
. From 1point 3acres bbs
Note that what is described above is not the output you should generate, but a tip on how you can get to the desired output inside your code.

Input description/format

The first line of the file contains three numbers: the number of citizens in Redmond, the length of the citizen’s DNA and the length of the virus’ DNA.

This is followed by one sequence of DNA per line, representing in order the citizens’ DNA. The last DNA sequence of the file is the virus’ DNA.

You can assume that the virus’ DNA sequence is always shorter than the citizen’s DNA sequences.. 牛人云集,一亩三分地

Output description/format

The below example becomes clear if we give the “DNA match score” as well as the longest sequence of DNA matched.. 1point3acres

Person #0: G, 0.333
Person #1: GCC, 1.000
Person #2: CC, 0.667
Person #3: GC, 0.667
Person #4: GC, 0.667.1point3acres网

Person 1 has a 1.0 probability of getting sick, so he gets vaccinated first. Persons 2, 3, and 4 are the next highest probable to get sick, so they get vaccinated second. Person 0 has the least chance to get sick; he gets vaccinated last.

Example input

5 10 3
AGGAAAAGAG
CGAGGCCAAC
GACAAAACCG
GCGACGCAGA
AACAGCGCAG
GCC

Example output

Person #0: 3.
Person #1: 1.
Person #2: 2.
Person #3: 2.
Person #4: 2.

来源一亩.三分地论坛.
头像被屏蔽
SUNYANGT 发表于 2014-10-4 01:00:28 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

aliyucun 发表于 2014-10-5 01:57:46 | 显示全部楼层
我也是拿了第一,但是还没有谁联系我...Orz.
不知道这种on campus的面试题大概是什么样子的难度?
回复 支持 反对

使用道具 举报

本版积分规则

提醒:发帖可以选择内容隐藏,部分板块支持匿名发帖。请认真读完以下全部说明:

■隐藏内容方法: [hide=200]你想要隐藏的内容比如面经[/hide]
■意思是:用户积分低于200则看不到被隐藏的内容
■可以自行设置积分值,不建议太高(200以上太多人看不到),也不建议太低(那就没必要隐藏了)
■建议只隐藏关键内容,比如具体的面试题目、涉及隐私的信息,大部分内容没必要隐藏。
■微信/QQ/电子邮件等,为防止将来被骚扰甚至人肉,以论坛私信方式发给对方最安全。
■匿名发帖的板块和方法:http://www.1point3acres.com/bbs/thread-405991-1-1.html

关闭

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

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

custom counter

GMT+8, 2018-5-25 23:03

Powered by Discuz! X3

© 2001-2013 Comsenz Inc. Design By HUXTeam

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