n*e
2 楼
co-ask
p*2
4 楼
这东西被大家讨论烂了。自从我上论坛以来就没有再讨论过。
g*e
5 楼
given a logfile
a A
b B
a B
c E
a C
where left column is user ID, right column is page ID
find the most frequent pattern of 3 consecutive page visits of all the users.
Solution:
two hash table:
1. indexed by user, entry content=previous two visit page IDs of the user
2. store the count. indexed by 3 page IDs? cannot remember...
a A
b B
a B
c E
a C
where left column is user ID, right column is page ID
find the most frequent pattern of 3 consecutive page visits of all the users.
Solution:
two hash table:
1. indexed by user, entry content=previous two visit page IDs of the user
2. store the count. indexed by 3 page IDs? cannot remember...
E*t
6 楼
原题是这样的
给你一个大log 文件,只有两个列,user id 和page number举一个简单的例子:
User ID Page #
A 1
A 2
A 3
B 2
B 3
C 2
B 4
A 4
对于A有
A连续访问了 1->2->3
2->3->4
对于B
2->3->4
对于C
2
那么最经常访问的三个连续的页面为 2->3->4
。
我知道两个hash table来搞。
我的问题是:
user id 和 两个顺序page组成的hash table是怎么建立的。能直接用STL的map么,还
是必须自己写data structure?
谁能轻轻丢个链接,谢谢~!
给你一个大log 文件,只有两个列,user id 和page number举一个简单的例子:
User ID Page #
A 1
A 2
A 3
B 2
B 3
C 2
B 4
A 4
对于A有
A连续访问了 1->2->3
2->3->4
对于B
2->3->4
对于C
2
那么最经常访问的三个连续的页面为 2->3->4
。
我知道两个hash table来搞。
我的问题是:
user id 和 两个顺序page组成的hash table是怎么建立的。能直接用STL的map么,还
是必须自己写data structure?
谁能轻轻丢个链接,谢谢~!
g*e
8 楼
当然是直接调用啦,这题考点不是怎么写hash table。
h*e
13 楼
乍一看标题还以为面试亚麻三次。
t*e
14 楼
One table, user id to 3-element queue.
Make a unique key for each different 3-element, second table is from this
key to its count.
Make a unique key for each different 3-element, second table is from this
key to its count.
p*2
15 楼
对了。第二个hashtable应该用个BST吧?
相关阅读
如果opt申请了不到3个月,加急催有用吗?请问哪位大侠能介绍下Yelp家的面试流程Epic电面通常都面试些什么啊电话面试从头到尾对方都很冷淡换工作的时候了解融资/ipo/以及startup 的 stock option 怎么定价epi 还是 The Algorithm Design Manualhireright background check,曾经工作过的中国公司倒闭了急问:跟hiring manager约好的电话面试如何改时间[工作机会]Accountant和Software Developer请教刷题问两几个EBAY的题G面经放假前看来是拿不到正式offer了,煎熬啊我也来聊一下湾区的startup (转载)OPT转CPT,需要rehire,并且不能保持full-time regular要以intern身份工作?要不要催一下HRtwitter 又一题zigzag 这个题考什么算法或数据结构。有互联网公司全职经验的人请求google实习host match interview