mergesort.html

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

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

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

<P>
<strong>Definition:</strong>
A <a href="sort.html" tppabs="http://hissa.nist.gov/dads/HTML/sort.html"><em>sort</em></a> algorithm which splits the items to be sorted into two groups, <a href="recursion.html" tppabs="http://hissa.nist.gov/dads/HTML/recursion.html"><em>recursively</em></a> sorts each group, and  <a href="merge.html" tppabs="http://hissa.nist.gov/dads/HTML/merge.html"><em>merges</em></a> them into a final, sorted sequence.
<P><strong>See also</strong>
<a href="divideconqr.html" tppabs="http://hissa.nist.gov/dads/HTML/divideconqr.html"><em>divide and conquer</em></a>, <a href="balanckwayms.html" tppabs="http://hissa.nist.gov/dads/HTML/balanckwayms.html"><em>balanced k-way merge sort</em></a>, <a href="polyphmrgsrt.html" tppabs="http://hissa.nist.gov/dads/HTML/polyphmrgsrt.html"><em>polyphase merge sort</em></a>, <a href="externalsort.html" tppabs="http://hissa.nist.gov/dads/HTML/externalsort.html"><em>external sort</em></a>.
<P><em>Note:
The run 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>(n log n).</em>
<P>Author: <a href="terms.html#authorPEB" tppabs="http://hissa.nist.gov/dads/terms.html#authorPEB">PEB</a>
<H2>Implementation</H2>
<A HREF="javascript:if(confirm('http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.cs.sunysb.edu/%7Ealgorith/implement/handbook/distrib/handbook/algs/4/421.sort.c  \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://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.cs.sunysb.edu/%7Ealgorith/implement/handbook/distrib/handbook/algs/4/421.sort.c'" tppabs="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.cs.sunysb.edu/%7Ealgorith/implement/handbook/distrib/handbook/algs/4/421.sort.c">(C)</A> which needs <A HREF="javascript:if(confirm('http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.cs.sunysb.edu/%7Ealgorith/implement/handbook/distrib/handbook/algs/4/431.merge.c  \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://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.cs.sunysb.edu/%7Ealgorith/implement/handbook/distrib/handbook/algs/4/431.merge.c'" tppabs="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.cs.sunysb.edu/%7Ealgorith/implement/handbook/distrib/handbook/algs/4/431.merge.c">list merge (C)</A> or <A HREF="javascript:if(confirm('http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.cs.sunysb.edu/%7Ealgorith/implement/handbook/distrib/handbook/algs/4/432.merge.c  \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://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.cs.sunysb.edu/%7Ealgorith/implement/handbook/distrib/handbook/algs/4/432.merge.c'" tppabs="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.cs.sunysb.edu/%7Ealgorith/implement/handbook/distrib/handbook/algs/4/432.merge.c">array merge (C)</A>, <A HREF="javascript:if(confirm('http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.cs.sunysb.edu/%7Ealgorith/implement/handbook/distrib/handbook/algs/4/421.sort.p  \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://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.cs.sunysb.edu/%7Ealgorith/implement/handbook/distrib/handbook/algs/4/421.sort.p'" tppabs="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.cs.sunysb.edu/%7Ealgorith/implement/handbook/distrib/handbook/algs/4/421.sort.p">(Pascal)</A>which needs <A HREF="javascript:if(confirm('http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.cs.sunysb.edu/%7Ealgorith/implement/handbook/distrib/handbook/algs/4/431.merge.p  \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://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.cs.sunysb.edu/%7Ealgorith/implement/handbook/distrib/handbook/algs/4/431.merge.p'" tppabs="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.cs.sunysb.edu/%7Ealgorith/implement/handbook/distrib/handbook/algs/4/431.merge.p">list merge (Pascal)</A> or <A HREF="javascript:if(confirm('http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.cs.sunysb.edu/%7Ealgorith/implement/handbook/distrib/handbook/algs/4/432.merge.p  \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://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.cs.sunysb.edu/%7Ealgorith/implement/handbook/distrib/handbook/algs/4/432.merge.p'" tppabs="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.cs.sunysb.edu/%7Ealgorith/implement/handbook/distrib/handbook/algs/4/432.merge.p">array merge (Pascal)</A>.  <A HREF="javascript:if(confirm('http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.cs.ubc.ca/spider/harrison/Java/ExtraStorageMergeSortAlgorithm.java  \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://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.cs.ubc.ca/spider/harrison/Java/ExtraStorageMergeSortAlgorithm.java'" tppabs="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.cs.ubc.ca/spider/harrison/Java/ExtraStorageMergeSortAlgorithm.java">(Java)</A>. Other implementations may be available through the <A HREF="javascript:if(confirm('http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.cs.sunysb.edu/%7Ealgorith/files/sorting.shtml  \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://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.cs.sunysb.edu/%7Ealgorith/files/sorting.shtml'" tppabs="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.cs.sunysb.edu/%7Ealgorith/files/sorting.shtml">Stony Brook Algorithm Repository, Sorting</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 Thu Aug 19 09:33:42 1999.<BR>
HTML page formatted Wed Dec 22 09:35:50 1999.

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

</BODY>
</HTML>

⌨️ 快捷键说明

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