求解一道很难的算法面试题# JobHunting - 待字闺中
S*C
1 楼
Given an array A, the task is to find floor(n/k)th largest, floor(2n/k)th
largest, floor(3n/k)th largest,....and so on upto floor(kn/k)th largest.
Give an O(n*logk) algorithm.
largest, floor(3n/k)th largest,....and so on upto floor(kn/k)th largest.
Give an O(n*logk) algorithm.