Possible Duplicate:
Worst-case O(n) algorithm for doing k-selection
Given the following question :
In an integer array with N elements , find the minimum k elements (k << N)
You can assume that N
is a large number.
I'm thinking about a minimum heap , anyone has a better solution ?
Regards