What is meant by to “Sort in Place”?

Technology CommunityCategory: SortingWhat is meant by to “Sort in Place”?
VietMX Staff asked 3 years ago

The idea of an in-place algorithm isn’t unique to sorting, but sorting is probably the most important case, or at least the most well-known. The idea is about space efficiency – using the minimum amount of RAM, hard disk or other storage that you can get away with.

The idea is to produce an output in the same memory space that contains the input by successively transforming that data until the output is produced. This avoids the need to use twice the storage – one area for the input and an equal-sized area for the output.

Quicksort is one example of In-Place Sorting.