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