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


一亩三分地论坛

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

Twitter OA

[复制链接] |试试Instant~ |关注本帖
tyang12 发表于 2016-4-29 02:06:02 | 显示全部楼层 |阅读模式

2016(1-3月) 码农类 硕士 全职@Twitter - 校园招聘会 - 在线笔试 |Otherfresh grad应届毕业生

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

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

x
突然发现上个月的作的twitter OA还没发,一样是60mins 两题,
第一题:. 鐣欏鐢宠璁哄潧-涓浜╀笁鍒嗗湴
Input format:
N        // count of number in the input. 1point 3acres 璁哄潧
d[0]        //1st number
d[1]        //2nd number.鏈枃鍘熷垱鑷1point3acres璁哄潧
...
d[n-1]        //last number

. 1point3acres.com/bbs
Output format:
The first line contains a string of n bits, where the i-th bit (as read from left to right) indicates if there is any number before b which is equal to b.
The second line contains a string of n bits, where the i-th bit (as read from left to right) indicates if there is any number after b which is equal to b.

Sample input:.1point3acres缃
6        //total 6 numbers given below
1
3
2
3
4
1. 鐗涗汉浜戦泦,涓浜╀笁鍒嗗湴

Sample output:
000101
110000. 鐗涗汉浜戦泦,涓浜╀笁鍒嗗湴


这题我在做之前看地里其他帖子分享过,我是用HashSet来做

第二題:
Return the count of numbers X in the range 1<=X<=N that satisfy the following property:
(X-1) !  % X = X-1
.鏈枃鍘熷垱鑷1point3acres璁哄潧
Input Parameter:
A single integer N. more info on 1point3acres.com

. visit 1point3acres.com for more.Constraints:
1 <= N <= 10^5

Output Format:. 1point 3acres 璁哄潧
A single integer which in the count of the numbers that satisfy the above property.

Sample Input:
2. 鐗涗汉浜戦泦,涓浜╀笁鍒嗗湴
Sample Output:
2

Sample Input:
4
Sample Output:
3

这题我作之前没看过,所以一看到有点慌,我列了N= 1~7的结果后,猜测就是在找prime number (时间不够,没想到怎么证明...),幸运通过所有test cases,.鏈枃鍘熷垱鑷1point3acres璁哄潧
------------------------------------------------------------------------
. 鐣欏鐢宠璁哄潧-涓浜╀笁鍒嗗湴
做完后跟地里大家一样填了pre-interview questions,直到4/14才收到信,说这周五前会有消息,等了好久,希望这两天能得到下一步面试啊!!! ! 鏉ユ簮涓浜.涓夊垎鍦拌鍧.

评分

1

查看全部评分

本帖被以下淘专辑推荐:

本版积分规则

关闭

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

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

custom counter

GMT+8, 2017-11-23 00:59

Powered by Discuz! X3

© 2001-2013 Comsenz Inc. Design By HUXTeam

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