Merge sort splits the slice, sorts each half recursively and merges them by repeatedly taking the smaller front item. When two items are equal it takes the left one first, which makes it stable. The price is a temporary buffer as large as the input.