get indexes of n smallest elements in an array

Posted by erasmus on Stack Overflow See other posts from Stack Overflow or by erasmus
Published on 2010-05-06T20:25:04Z Indexed on 2010/05/06 20:28 UTC
Read the original article Hit count: 186

Filed under:

I have an int array int[] myArray = new int[100]; and want to get indexes of smallest 10 (any n) elements. How can I do this?

© Stack Overflow or respective owner

Related posts about java