In particular without modifying the input.
I\'ve so far been unable to find anything on this, I wonder if it has a solution better than the obvious O(n log n) time.