Stable In-place sorting in O(n*log(n)) worst time