NIST

balanced two-way merge sort

(algorithm)

Definition: A balanced k-way merge sort that sorts a data stream using repeated merges. It distributes the input into two streams by repeatedly reading a block of input that fits in memory, a run, sorting it, then writing it to the next stream. It then repeatedly merges the two streams and puts each merged run into one of two output streams until there is a single sorted output.

Generalization (I am a kind of ...)
external sort.

See also merge sort, simple merge, balanced merge sort, nonbalanced merge sort, two-way merge sort.

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 16 May 2005.
HTML page formatted Fri Mar 25 16:20:34 2011.

Cite this as:
Art S. Kagel, "balanced two-way merge sort", in Dictionary of Algorithms and Data Structures [online], Paul E. Black, ed., U.S. National Institute of Standards and Technology. 16 May 2005. (accessed TODAY) Available from: http://www.nist.gov/dads/HTML/balanc2wayms.html

to NIST home page