in reply to Top and bottom 10 percent elements of an array

Note that your logic may fail if there are duplicate entries in the array. You may get "A"s, "B"s or "-"s more/less than required percentage depending on your implementation.

  • Comment on Re: Top and bottom 10 percent elements of an array

Replies are listed 'Best First'.
Re^2: Top and bottom 10 percent elements of an array
by sesemin (Beadle) on Apr 29, 2010 at 07:44 UTC
    Good point, Thanks

    I will try Ikegami or codeacrobat solutions (below). seems more reliable. I was thinking the index sorting is the way to go too but not smart enough to finish the task.