I have an array of objects already sorted lexicographicaly by name.
I need to have them sorted by additional criteria as well.
Obviously, I could copy the array and sort it by some other order.
Question is, is there any kind of algorithm that takes advantage of the fact that there is a new, empty array available? Doing sort and copy in one go?