I’m wanting to sort a large array of Strings (notably File.list(), which I cannot externalise or reduce further) without using [much] extra memory.
Arrays.sort() says it does a merge sort, and wikipedia says that some implementations allocate the size of the original array for storing the sorted output. (This seems to be supported by the System.arraycopy reference in the method).
Is there an in-place sorting algorithm I can use instead which is memory efficient?
quicksort is in-place and very fast. See here.