作者mqazz1 (无法显示)
站内Prob_Solve
标题[问题] multiselection
时间Mon Nov 7 20:22:56 2011
consider the multiselection problem: giben a set S of n elements and a set K
of r ranks k1, k2,..., kr, find the k1-th, k2-th, ..., kr-th smallest elements
For example, if K={2,7,9,50}, the problem is to find the 2nd, 7th, 9th, 50th
smallest elements.
Give an O(nlogr) time algorithm to solve this problem
请问这题要怎麽解呢?
谢谢
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 218.166.116.67
1F:→ suhorng:divide and conquer on r, with O(n) selection algorithm 11/07 20:26
请问s大的divide and conquer on r是怎麽应用到这个问题的@@?
===============
另外还想请问一些问题..这个是老师的解答
http://ppt.cc/Q(en
请问跑BFS的作用是什麽?
谢谢
※ 编辑: mqazz1 来自: 218.166.118.9 (11/08 20:19)
2F:→ firejox:就是search而已 没别的意思... 11/09 20:35