NIST

simple merge

(algorithm)

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.

Author: ASK


Go to the Dictionary of Algorithms and Data Structures home page.

If you have suggestions, corrections, or comments, please get in touch with Paul E. Black.

Entry modified 17 December 2004.
HTML page formatted Fri Mar 25 16:20:35 2011.

Cite this as:
Art S. Kagel, "simple merge", in Dictionary of Algorithms and Data Structures [online], Paul E. Black, ed., U.S. National Institute of Standards and Technology. 17 December 2004. (accessed TODAY) Available from: http://www.nist.gov/dads/HTML/simplemerge.html

to NIST home page