Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Google面试题,求kth largest element

Posted by happyxiaoshiquan at 2010-09-10 18:53:53
you are given 2 arrays sorted in decreasing order of size m and n 
respectively.

Input: a number k <= n*m and >= 1

Output: the kth largest sum( a+b ) possible. where
a (any element from array 1)
b (any element from array 2)

两个数组A,B 求第k个sum( a+b )。

给出高效解法!

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator