0

I would like to know why merge sort is stable and quick sort is not. I know if the relative order is preserved all the time then it's stable.

shouldn't merge sort still do tie breaking? will it be still stable when it doesn't do tie breaking?

I understand quick sort will be unstable if it doesn't do tie breaking.

can u give me some examples? thank you

in His Steps
  • 3,075
  • 6
  • 30
  • 38

1 Answers1

0

Looks like Stack already has the answer covered in a different thread

Quick Sort Vs Merge Sort

Community
  • 1
  • 1
UnhandledExcepSean
  • 12,504
  • 2
  • 35
  • 51