Redian新闻
>
请问 IEEE Senior Member 能加分吗?
avatar
请问 IEEE Senior Member 能加分吗?# Immigration - 落地生根
b*z
1
题目是这样的。
Inputs:
1. Text file containing IP-range (lost/highest IPs inclusive) and country-
code, ~10MB
2. Text file containing browser-IP and URL requested by that browser, ~1TB
Outputs:
1. Top-10 countries that generated the most requests.
2. Top-10 most requested URLs grouped by country.
exact counts are not important. Assume a single machine (16-core / 32-GB
RAM/ 4TB drive) dedicated to this job
第一问应该是用heap做。但是第二问还没有想到很好的方法。
avatar
f*1
2
请问EB1A申请中,表明申请人是IEEE Senior Member,这个有用吗?
谢谢。
avatar
s*x
3
How to map ip to a country efficiently? 以前有个同事喜欢问差不多同样的问题,
好像就是用两个level, first level direct small hash, second level binary
search.
Group by country is easy as we only have 200+ countries .
Group by country + url will be a lot, since not require exact number, you
probably can just main a small heap, say 10000 country + url , then find the
last top 10.
抛砖引玉。
avatar
i*t
4
i think yes
avatar
s*7
5
我来扔个砖头吧,没做过big data, 为面试专门看了一下
1苯办法,文件肯定至少要读一遍的,读的时候每个ip判断国家,按200个国家分成200
个文件, 同时用一个long[20]数组记录着个国家的ip数,数组排序就得到前10
2.每个国家的文件,根据该国的ip数和request数,一个或者分做多个(32G/ip数*
request数)map(ip, request number),再读一遍,用heap就可以找到 top 10了
avatar
k*e
6
i think so
avatar
m*k
7
1 用的是browser IP, 直接读文件, update 一个HashMap, req_count>, update 一个小文件,文件名为URL_HASH,小文件只有一条纪录:<
countryCode_of_URL,
URL,req_count>
最后再heaplify一下HashMap, 不需要用long[20]数组和排序。
2 用的是URL,用上一步生成的所有小文件建立200+个堆。精确解。
avatar
n*p
8
据说这年头这个已经没用了。

【在 f******1 的大作中提到】
: 请问EB1A申请中,表明申请人是IEEE Senior Member,这个有用吗?
: 谢谢。

avatar
c*r
9
mark
avatar
b*d
10
map side join....
avatar
m*n
11
这道题很简单啊。
建一个二维histogram, x axis用IP分bin (可以每个country一个bin),y axis用
URL的hash value分bin。
然后顺序读入所有数据, fill 相对应的bin。内存绝对够用。
然后把histogram projection到x axis,建个10位的heap,用heap sort,搞定(1).
然后把histogram projection到y axis,建个10位的heap,用heap sort,搞定(2).

【在 b****z 的大作中提到】
: 题目是这样的。
: Inputs:
: 1. Text file containing IP-range (lost/highest IPs inclusive) and country-
: code, ~10MB
: 2. Text file containing browser-IP and URL requested by that browser, ~1TB
: Outputs:
: 1. Top-10 countries that generated the most requests.
: 2. Top-10 most requested URLs grouped by country.
: exact counts are not important. Assume a single machine (16-core / 32-GB
: RAM/ 4TB drive) dedicated to this job

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