ATT的LUMIA920有没有锁?# PDA - 掌中宝
S*h
1 楼
It is a small bay area IT firm. They asked first how to find 10 most
frequent strings from 10 billion (string, frequency) pairs. Easy, use heap
O(10^9*log10). Then they asked the second question.
How to find 10 most frequent strings in 10 billion string list?
Not much idea. I answered to sweep once to build (string,frequency) pair
and then sweep again to find the first 10. Is there any better way?
frequent strings from 10 billion (string, frequency) pairs. Easy, use heap
O(10^9*log10). Then they asked the second question.
How to find 10 most frequent strings in 10 billion string list?
Not much idea. I answered to sweep once to build (string,frequency) pair
and then sweep again to find the first 10. Is there any better way?