Stable sort

A Stable sort is any sorting algorithm that keeps "equal" elements in the same relative order in the output as they were in the input.