找回密码
 立即注册
搜索
总共850条微博

动态微博

查看: 786|回复: 0
打印 上一主题 下一主题
收起左侧

一道google面试题(没有答案)

[复制链接]

172

主题

448

帖子

9052

积分

跳转到指定楼层
楼主
发表于 2007-1-1 15:13:25 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

一共有N个机器,每个机器上有N个数。每个机器最多存O(N)个数并对它们操作。
如何找到N^2个数的中数(median)?
Given N computers networked together, with each computer storing N integers,
describe a procedure for finding the median of all of the numbers. Assume
that a computer can only hold O(N) integers (i.e. no computer can store all N^2
integers). Also assume that there exists a computer on the network without
integers, that we can use to interface with the computers storing the
integers

另外一道题:两个长字符串,找出他们最长的公共子字符串。
www.ddhw.com

 
回复

使用道具 举报

24小时热帖
    一周热门
      原创摄影
        美食美文
          您需要登录后才可以回帖 登录 | 立即注册

          本版积分规则

          Archiver|手机版|珍珠湾ART

          Powered by Discuz! X3 © 2001-2013 All Rights Reserved