Sorts of Sorts

An in-place sort reuses the space in the A array to return the sorted list. It uses only a constant amount of scratch space (i.e., an amount independent of n).

A stable sort has the property that if A[i] = A[j] and i < j with B[k] correponding to A[i] and B[l] to A[j], then k < l (i.e., the order of tied elements is not changed).


next up previous
Next: Other Applications Up: SORTING Previous: Keys