I was looking for a function that behaves just like the sort
function in GNU coreutils (in terms of the arguments it takes in) except that it just finds the maximum or minimum. In my particular case, I can do fine with sort
, but I was wondering what I would have to do if I was in a position where the extra log(n) work was unnecessary e.g. finding the maximum of say a billion random things repeatedly (each instance with a different billion random things, and repeatedly could mean a billion times or more, and things could be integers or whatever else sort
supports).
This is not such functionality but it is on the list of things to do for GNU coreutils. I.E. we'll add a new option to sort(1) to support this