是百度的一道题

寻找热门查询:
搜索引擎会通过日志文件把用户每次检索使用的所有检索串都记录下来,每个查询串
的长度为1-255字节。假设目前有一千万个记录,
这些查询串的重复度比较高,虽然总数是1千万,但如果除去重复后,不超过3百万个
。一个查询串的重复度越高,说明查询它的用户越多,
也就是越热门。请你统计最热门的10个查询串,要求使用的内存不能超过1G。
(1)请描述你解决这个问题的思路;
(2)请给出主要的处理流程,算法,以及算法的复杂度。

  One Response to “百度的一道笔试题”

  1. 开启simple tag后在标签-选项处
    相关日志Automatically display related posts into feeds
    Automatically display related posts into post content NoAllBlogonlyFeedonlyHomeonlySingularonlyPageonlySingleonly
    No – 不显示 (默认)
    All – 在博客与 Feed 中显示 (我选这个)
    Blogonly – 仅在博客上显示
    homeonly – Only on your home page.
    singularonly – Only on your singular view (single & page).
    singleonly – Only on your single view.
    pageonly – Only on your page view.

 Leave a Reply

(required)

(required)


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

使用腾讯微博登陆

Protected by WP Anti Spam
   
© 2011 Information Retrieval Blog Suffusion theme by Sayontan Sinha