Redian新闻
>
受不了神座了,抢了个这个 (转载)
avatar
受不了神座了,抢了个这个 (转载)# Hardware - 计算机硬件
Z*Z
1
Give large transaction data, for each transaction, you have customer id, req
uest and data file; the VP wants to find out the repeat customers in the las
t 2 days. Design its data structure.
avatar
v*n
2
【 以下文字转载自 PhotoGear 讨论区 】
发信人: vonion (哪儿疼切哪儿), 信区: PhotoGear
标 题: 受不了神座了,抢了个这个
发信站: BBS 未名空间站 (Tue Dec 27 19:57:59 2011, 美东)
http://outlet.lenovo.com/4518xf4.html
算deal吗
好像CPU还不错,这个能不能自己再装显卡神马的?
avatar
h*k
3
需要进一步搞清题目。比如customer多不多,如果不多,对每个customer维护一个按时
间倒排的stack,存储他的所有transaction。操作复杂度是O(customer NUM)
如果customer多,按照时间存储,每天的transaction按customer id排序存入。这样要
求变为找两个排序的list的公共字符。复杂度是O(average transaction num per day)
.
avatar
l*n
4
还以为有显示器。。。
avatar
f*5
5
you can use hashtable for those kind of questions.
1) scan the transaction logs get each transaction happened in the first
day based on data
2) create hashtable using customer id as key,store all the customer ids
in hashtable which came in the first day
3)scan the transaction for the second day.
if the customer id is in hashtable,it means he came on both the two days
that is what u want

req
las

【在 Z*****Z 的大作中提到】
: Give large transaction data, for each transaction, you have customer id, req
: uest and data file; the VP wants to find out the repeat customers in the las
: t 2 days. Design its data structure.

avatar
v*n
6
我靠这么惨。。

【在 l*****n 的大作中提到】
: 还以为有显示器。。。
avatar
f*5
7
若是超大数据量,还要用到海量存储的一些方法。。

days

【在 f*********5 的大作中提到】
: you can use hashtable for those kind of questions.
: 1) scan the transaction logs get each transaction happened in the first
: day based on data
: 2) create hashtable using customer id as key,store all the customer ids
: in hashtable which came in the first day
: 3)scan the transaction for the second day.
: if the customer id is in hashtable,it means he came on both the two days
: that is what u want
:
: req

avatar
Z*Z
8
嗯,喜欢这个,有点像求交集。
能提一下一般的海量存储都有啥方案么?谢谢!

【在 f*********5 的大作中提到】
: you can use hashtable for those kind of questions.
: 1) scan the transaction logs get each transaction happened in the first
: day based on data
: 2) create hashtable using customer id as key,store all the customer ids
: in hashtable which came in the first day
: 3)scan the transaction for the second day.
: if the customer id is in hashtable,it means he came on both the two days
: that is what u want
:
: req

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。