一亩三分地论坛

 找回密码
 Sign Up 注册获取更多干货
码农求职神器Triplebyte:
不用海投,内推你去多家公司面试
Airbnb 数据科学职位
in analytics and inference
电商初创公司Good Days
招聘SDE/UI/TPM等职位实习生
把贵司招聘信息放这里
查看: 3017|回复: 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:. 鍥磋鎴戜滑@1point 3 acres
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.
list[n] stores the real value of the data
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.

2nd question is event dispatch system,.1point3acres缃
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. 1point 3acres 璁哄潧
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>();. more info on 1point3acres.com
. 鐗涗汉浜戦泦,

评分

3

查看全部评分

本帖被以下淘专辑推荐:

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

使用道具 举报

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

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-12-18 12:55

Powered by Discuz! X3

© 2001-2013 Comsenz Inc. Design By HUXTeam

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