Professional Documents
Culture Documents
In Place Sorting Vs Out Place Sorting
In Place Sorting Vs Out Place Sorting
Sorting is the process of arranging g a list of elements in a particular order (Ascending or Descending).
In place sorting vs out place sorting
An in-place sorting algorithm sorts the elements in place: that is, it needs only O(1) extra space. An out-
of-place sorting algorithm needs extra space to put the elements in as it's sorting them. Usually this
means O(n) extra space.
Stable sorting vs unstable sorting
Stable sorting algorithms preserve the relative order of equal elements, while unstable
sorting algorithms don't. ... Stable sorting maintains the order of the two equal balls numbered 8,
whereas unstable sorting may invert the relative order of the two 8s.