idealmerge.html

来自「数据结构词典(英文)」· HTML 代码 · 共 48 行

HTML
48
字号
<!DOCTYPE HTML PUBLIC "-//IETF//DTD W3 HTML 2.0//EN">
<HTML lang="en-US">
<HEAD>
<TITLE>ideal merge</TITLE>
<META name="description"
  content="Definition of ideal merge,
	possibly with links to more information and implementations.">
<META name="keywords" content="ideal merge">
</HEAD>
<BODY BGCOLOR="#FFFFFF">

<H1>ideal merge</H1>
<P>
(algorithm)

<P>
<strong>Definition:</strong>
An algorithm to <a href="merge.html" tppabs="http://hissa.nist.gov/dads/HTML/merge.html"><em>merge</em></a> <em>N</em> streams.  To begin the streams are sorted by the value of the head element of each. Then the head of the first stream, which is the least since the streams were sorted, is removed and written to the output.  That stream is inserted back into the list of streams according to its new head.  Taking the head of the first stream and reinserting that stream is repeated until all elements have been processed. Using <a href="binarysrch.html" tppabs="http://hissa.nist.gov/dads/HTML/binarysrch.html"><em>binary search</em></a> to find the new place to insert a stream, the execution time is <a href="theta.html" tppabs="http://hissa.nist.gov/dads/HTML/theta.html"><em> <img src="Theta-1.gif" tppabs="http://hissa.nist.gov/dads/HTML/Images/Theta.gif"  border=0 height=10 width=8  alt="Capital Theta"></em></a>(M logN) where <em>M</em> is the total number of elements.
<P><strong>See also</strong>
<a href="simplemerge.html" tppabs="http://hissa.nist.gov/dads/HTML/simplemerge.html"><em>simple merge</em></a>.
<P><em>Note:
Ideal merge was first mentioned by Art S. Kagel as  part of the implementation of the Unshuffle sort.</em>
<P>Author: <a href="terms.html#authorASK" tppabs="http://hissa.nist.gov/dads/terms.html#authorASK">ASK</a>

<hr>

Go to the
<A HREF="terms.html" tppabs="http://hissa.nist.gov/dads/terms.html">Algorithms, Data Structures, and Problems</A>
home page.

<hr>

If you have suggestions, corrections, or comments, please get in touch
with
<a href="javascript:if(confirm('http://hissa.nist.gov/~black/black.html  \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address.  \n\nDo you want to open it from the server?'))window.location='http://hissa.nist.gov/~black/black.html'" tppabs="http://hissa.nist.gov/~black/black.html">Paul E. Black</a>
&nbsp;(<a href="mailto:paul.black@nist.gov">paul.black@nist.gov</a>).

<p>
Entry modified Mon Jun  7 13:50:40 1999.<BR>
HTML page formatted Wed Dec 22 09:35:33 1999.

<P>
This page's URL is
<A href="idealmerge.html" tppabs="http://hissa.nist.gov/dads/HTML/idealmerge.html">http://hissa.nist.gov/dads/HTML/idealmerge.html</A>

</BODY>
</HTML>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?