珍珠湾ART

标题: 一道google面试题(没有答案) [打印本页]

作者: 海姑娘    时间: 2007-1-1 15:13
标题: 一道google面试题(没有答案)

一共有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

 

www.ddhw.org---
---
海姑娘个人网站
 
http://www.tianxianmeimei.com/xuehua/xhindex.html





欢迎光临 珍珠湾ART (http://zzwav.com/) Powered by Discuz! X3