找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 1528|回复: 5
收起左侧

[Bloomberg] Bloomberg面经Senior职位

[复制链接]

1183

主题

187

精华

3729

积分

神级会员

Rank: 7Rank: 7Rank: 7

积分
3729
发表于 2-5-2017 02:45 PM | 显示全部楼层 |阅读模式

亲!马上注册或者登录会查看更多内容!

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
本帖最后由 Sophia 于 2-5-2017 02:47 PM 编辑
1 C: E0 I' j! A9 X( y  {5 ]6 a8 T7 T/ V# A0 d! G
I was asked to design a stock ticker system. Stock ticker is simply the shortened name of company and its current stock size. e.g. for Apple - "AAPL" -> "115"7 G; U3 I3 \6 w. V* _. V
He asked me to design a data structure to store incoming stream of stock tickers. Stream can contain same company more than once but all the values of it had to be stored. I used HashMap<String, List<Integer>>. Then he was adding more functionalities to system I don't exactly remember the questions now but one of them was related to calculating some ratio in constant time. Some of the questions were challenging.

1128

主题

177

精华

3509

积分

神级会员

Rank: 7Rank: 7Rank: 7

积分
3509
发表于 2-5-2017 02:45 PM | 显示全部楼层

columnar db?

回复 支持 反对

使用道具 举报

1227

主题

188

精华

3780

积分

神级会员

Rank: 7Rank: 7Rank: 7

积分
3780
发表于 2-5-2017 02:45 PM | 显示全部楼层

Wouldn't a trie with a queue for each node be a nice structure. Wherever queue is present, it indicates a ticker from root to that node exist. And queue can hold the prices read so far in the incoming stream. Thoughts/suggestions?

回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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