由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - 这题怎么做?
相关主题
电面不好,求bless。这题怎么答?Google电面题
请教L的分行输出题comparision
求OJ container with most water O(n)解法bloomberg面试经历
split String into multiple lines贴个刚才的电话面试题
c++ thread 求助 (转载)puzzle, 娱乐一下
[合集] google interview question发篇面经
Google Phone Interview这题什么意思?
限时2分钟请问这题有没有公式可以直接求解?
相关话题的讨论汇总
话题: lines话题: identical话题: line话题: 这题话题: each
进入JobHunting版参与讨论
1 (共1页)
H*M
发帖数: 1268
1
讨论讨论
You have a file with millions of lines of data. Only two lines are identical
; the rest are all unique. Each line is so long that it may not even fit in
memory. What is the most efficient solution for finding the identical lines?
这个连每行都不能放进内存里。有什么好方法吗?
g*******y
发帖数: 1930
2
for each line, compute a key, hash the key, and also store the index of line(for later comparision)
manually compare lines with same key

identical
in
lines?

【在 H*M 的大作中提到】
: 讨论讨论
: You have a file with millions of lines of data. Only two lines are identical
: ; the rest are all unique. Each line is so long that it may not even fit in
: memory. What is the most efficient solution for finding the identical lines?
: 这个连每行都不能放进内存里。有什么好方法吗?

h**k
发帖数: 3368
3
计算hash function value,然后比较?

identical
in
lines?

【在 H*M 的大作中提到】
: 讨论讨论
: You have a file with millions of lines of data. Only two lines are identical
: ; the rest are all unique. Each line is so long that it may not even fit in
: memory. What is the most efficient solution for finding the identical lines?
: 这个连每行都不能放进内存里。有什么好方法吗?

m******9
发帖数: 968
4
这不是amazon的题目吗?
g*******y
发帖数: 1930
5
really?
我希望被亚马孙问到这类题目,呵呵

【在 m******9 的大作中提到】
: 这不是amazon的题目吗?
m******9
发帖数: 968
6
好主意
double hashing

line(for later comparision)

【在 g*******y 的大作中提到】
: for each line, compute a key, hash the key, and also store the index of line(for later comparision)
: manually compare lines with same key
:
: identical
: in
: lines?

1 (共1页)
进入JobHunting版参与讨论
相关主题
请问这题有没有公式可以直接求解?c++ thread 求助 (转载)
这题有解吗?[合集] google interview question
Google面试怎么这么难啊,LG很难过,我该怎么劝他呢? (转载)Google Phone Interview
如何回答这题:how to explain binary search tree to a 5 year old child限时2分钟
电面不好,求bless。这题怎么答?Google电面题
请教L的分行输出题comparision
求OJ container with most water O(n)解法bloomberg面试经历
split String into multiple lines贴个刚才的电话面试题
相关话题的讨论汇总
话题: lines话题: identical话题: line话题: 这题话题: each