一亩三分地论坛

 找回密码
 获取更多干货,去instant注册!

扫码关注一亩三分地公众号
查看: 207|回复: 0
收起左侧

[编程题] 求各位大神一道题!

[复制链接] |试试Instant~ |关注本帖
kissmeifyoucan 发表于 2016-2-24 03:31:36 | 显示全部楼层 |阅读模式

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

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

x
You have a service, which given a stock symbol returns TradeData. The service takes 20 seconds per request to return and the TradeData object is expected to have a size of on average 100 MB.  The TradeData will not change throughout the day.

class TradeDataService {
    TradeData querySlowTradeData(String stockSymbol)
}
今天面了一个trading company的intern,电面直接在网上写code,本人**一枚,感觉思路还是不清晰。求教!感激不尽!

You have N Gb (e.g. 4.5 Gb) available for your application, write a class such that the retrieval of the most recently queried tickers TradeData is as fast as possible.

Class MostRecentlyQueriedTradeData {
    TradeData getTradeData(String stockSymbol)
}

本版积分规则

请点这里访问我们的新网站:一亩三分地Instant.

Instant搜索更强大,不扣积分,内容组织的更好更整洁!目前仍在beta版本,努力完善中!反馈请点这里

关闭

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

手机版|小黑屋|一亩三分地论坛声明 ( 沪ICP备11015994号 )

custom counter

GMT+8, 2016-12-11 16:39

Powered by Discuz! X3

© 2001-2013 Comsenz Inc. Design By HUXTeam

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