Function TopN.getSorted

Returns the elements sorted by compFun. The array returned is a duplicate of the input array. Not cheap.

T[] getSorted ();