Stability of Merge sort

Mr.Php picture Mr.Php · Feb 23, 2013 · Viewed 16.8k times · Source

Is merge sort stable? I read it in a book which says merge sort is stable as long as the merge operation implemented properly. Is that true?

Answer

NinjaV picture NinjaV · Feb 23, 2013

true. It depends on how you properly implement the merge sort. http://en.wikipedia.org/wiki/Stable_sort#Stability