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?
true. It depends on how you properly implement the merge sort. http://en.wikipedia.org/wiki/Stable_sort#Stability