(algorithm)
Definition: A sort algorithm that splits the items to be sorted into two groups, recursively sorts each group, and merges them into a final, sorted sequence. Run time is Θ(n log n).
Generalization (I am a kind of ...)
sort.
Specialization (... is a kind of me.)
k-way merge sort, balanced k-way merge sort, polyphase merge sort.
Aggregate child (... is a part of or used in me.)
divide and conquer.
See also external sort, bitonic sort, strand sort.
Note: There seem to be some references to linear-time in-place merging; look for papers by Geffert, Katajainen & Pasanen.
Author: PEB
Comparison of quicksort, heapsort, and merge sort on modern processors.
Merge sort illustrated.
Merge sort vs. quick sort race. First a random permutation, then a near-worst case for merge sort.
Heap sort vs. merge sort race.
Merge sort illustrated through a Transylvanian-saxon (German) folk dance. Created at Sapientia University.
If you have suggestions, corrections, or comments, please get in touch with Paul Black.
Entry modified 6 April 2023.
HTML page formatted Thu Apr 6 11:44:03 2023.
Cite this as:
Paul E. Black, "merge sort", in
Dictionary of Algorithms and Data Structures [online], Paul E. Black, ed. 6 April 2023. (accessed TODAY)
Available from: https://www.nist.gov/dads/HTML/mergesort.html