10月28,K神开讲数据科学:AB Test/实验设计


一亩三分地论坛

 找回密码
 Sign Up 注册获取更多干货
天天打游戏、照样领工资、还办H1B
这份工作你要不要?
把贵司招聘信息放这里
查看: 2719|回复: 4
收起左侧

pure storage onsite

[复制链接] |试试Instant~ |关注本帖
lea82 发表于 2016-6-8 06:17:16 | 显示全部楼层 |阅读模式

2016(4-6月) 码农类 硕士 全职@pure storage - 内推 - Onsite |Fail在职跳槽

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

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

x
2 old questions:
implement a set, so that add, remove, lookup, clear operations would have O(1) time complexity, iteration would have O(size) complexity.
they don't like to jump to the right answer, kind of feel that they want you start using one array, and then another modification, and then combine both methods
Solution is 2 arrays, map[n], list[n] where for map, the index is the data x, the value is its index in list: map[2] = 0 if you first add a 2 to list..鏈枃鍘熷垱鑷1point3acres璁哄潧
list[n] stores the real value of the data . 鍥磋鎴戜滑@1point 3 acres
remove is from map[x] you find the index in list, you swap the list[--size] with list[map[x]]
for clear, you just set size to be 0
to lookup an item x, map[x]<size && list[map[x]] == true, return true.. Waral 鍗氬鏈夋洿澶氭枃绔,

2nd question is event dispatch system,
at time line, there are coming listeners for event fire, before event fire happens, queue these listeners (void register(CallBack cb)). when event fire happens(void fire()), process these events. 1point3acres.com/bbs
single thread, multithread situation.

Again I feel that they don't want you to jump directly to the right answer.

Single thread in Java:
boolean isFired = false;
Queue<Callback> q = new Queue<Callback>();
. 鐗涗汉浜戦泦,

评分

2

查看全部评分

本帖被以下淘专辑推荐:

firemusume 发表于 2016-6-14 08:52:46 | 显示全部楼层
你好,最近也在准备这家。请问您是在哪里onsite的啊,只有两道题吗?
回复 支持 反对

使用道具 举报

 楼主| lea82 发表于 2016-6-15 04:33:44 | 显示全部楼层
firemusume 发表于 2016-6-14 08:52
你好,最近也在准备这家。请问您是在哪里onsite的啊,只有两道题吗?
.1point3acres缃
mountain view.

I got 2 rounds, 1st round only 2 questions.
. 鐣欏鐢宠璁哄潧-涓浜╀笁鍒嗗湴
2nd round onsite for 3 questions.
回复 支持 反对

使用道具 举报

firemusume 发表于 2016-6-15 06:00:52 | 显示全部楼层
lea82 发表于 2016-6-15 04:33
mountain view.

I got 2 rounds, 1st round only 2 questions.

谢谢回复。不知能分享下round2的题目吗,或者楼主还没有去round2?
回复 支持 反对

使用道具 举报

Urumic 发表于 2016-6-16 07:49:36 | 显示全部楼层
请问楼主两轮onsite是同一线还是不同的日子呢?请问楼主方便的话能私信我后面的三道题吗?谢谢楼主。
回复 支持 反对

使用道具 举报

本版积分规则

关闭

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

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

custom counter

GMT+8, 2017-10-20 02:24

Powered by Discuz! X3

© 2001-2013 Comsenz Inc. Design By HUXTeam

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