Definition: Merge n sorted streams into one output stream. All the stream heads are compared, and the head with the least key is removed and written to the output. This is repeated until all streams are empty.
See also ideal merge, optimal merge.
Note: The run time is Θ(mn), where m is the total number of elements and n is the number of streams.
If you have suggestions, corrections, or comments, please get in touch with Paul Black.
Entry modified 17 December 2004.
HTML page formatted Wed Mar 13 12:42:46 2019.
Cite this as:
Art S. Kagel, "simple merge", in Dictionary of Algorithms and Data Structures [online], Paul E. Black, ed. 17 December 2004. (accessed TODAY) Available from: https://www.nist.gov/dads/HTML/simplemerge.html