阅读背景:

Find the largest K numbers from array (找出数组中最大的K个值)

来源:互联网 

Recently i was doing some study on algorithms. A classic problem is to find the K largest(smallest) numbers from an array. I mainly studyed two methods, one is directly methold. It is an extension of select sort, always select the largest number from the array. The pseudo code is as below. The algorithm complexity is O(kn).Recently i was doing some study on algorithms.




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: