Merge Sort
An Introduction with Examples |
Prof. David Bernstein
|
Computer Science Department |
bernstdh@jmu.edu |
Sorting the six-element array (8, 4, 7, 3, 9, 3)
mergesort
and one
call to merge
mergesort
has worst case
efficiency of \(T(n/2)\)merge
has worst case efficiency of
\(n\) (to merge the two half arrays)