If you just want the largest value (and its position) then it can be done conveniently without sorting or grading. If you want the largest k values where k>1 then the most convenient way is to grade, along the lines that Raul Miller has shown.
Why do you want to avoid sorting/grading? In J, for vectors of many datatypes, including the integer and floating point datatypes, sorting and grading takes linear time. ----- Original Message ----- From: Nick Kostirya <[EMAIL PROTECTED]> Date: Thursday, March 20, 2008 2:25 Subject: [Jprogramming] Biggest values from list To: [email protected] > Hello, All > > Can you please provide me with the most optimal way of picking > out a > given number of elements with the biggest values from a huge list? > > The values and the elements' positions in a list are a matter of > interest. > > Can we manage this without sorting? ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
