📄 heap.html
字号:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD W3 HTML 2.0//EN">
<HTML lang="en-US">
<HEAD>
<TITLE>heap</TITLE>
<META name="description"
content="Definition of heap,
possibly with links to more information and implementations.">
<META name="keywords" content="heap">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<H1>heap</H1>
<P>
(data structure)
<P>
<strong>Definition:</strong>
A <a href="tree.html" tppabs="http://hissa.nist.gov/dads/HTML/tree.html"><em>tree</em></a> where every <a href="node.html" tppabs="http://hissa.nist.gov/dads/HTML/node.html"><em>node</em></a> has a <a href="key.html" tppabs="http://hissa.nist.gov/dads/HTML/key.html"><em>key</em></a> more extreme (greater or less) than the key of its <a href="parent.html" tppabs="http://hissa.nist.gov/dads/HTML/parent.html"><em>parent</em></a>.
<P><strong>See also</strong>
<a href="heapsort.html" tppabs="http://hissa.nist.gov/dads/HTML/heapsort.html"><em>heap sort</em></a>, <a href="binaryheap.html" tppabs="http://hissa.nist.gov/dads/HTML/binaryheap.html"><em>binary heap</em></a>, <a href="karyheap.html" tppabs="http://hissa.nist.gov/dads/HTML/karyheap.html"><em>k-ary heap</em></a>, <a href="priorityque.html" tppabs="http://hissa.nist.gov/dads/HTML/priorityque.html"><em>priority queue</em></a>, <a href="heapproperty.html" tppabs="http://hissa.nist.gov/dads/HTML/heapproperty.html"><em>heap property</em></a>.
<P><em>Note:
Insertion is <a href="bigOnotation.html" tppabs="http://hissa.nist.gov/dads/HTML/bigOnotation.html"><em>O(ln n)</em></a> where <em>n</em> is the number of nodes.</em>
<P>Author: <a href="terms.html#authorCLK" tppabs="http://hissa.nist.gov/dads/terms.html#authorCLK">CLK</a>
<H2>Implementation</H2>
<A HREF="javascript:if(confirm('http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.dcc.uchile.cl/%7Eoalonso/handbook/algs/5/513.del.c.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://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.dcc.uchile.cl/%7Eoalonso/handbook/algs/5/513.del.c.html'" tppabs="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.dcc.uchile.cl/%7Eoalonso/handbook/algs/5/513.del.c.html">delete (C)</A> and <A HREF="javascript:if(confirm('http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.dcc.uchile.cl/%7Eoalonso/handbook/algs/5/513.ins.c.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://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.dcc.uchile.cl/%7Eoalonso/handbook/algs/5/513.ins.c.html'" tppabs="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.dcc.uchile.cl/%7Eoalonso/handbook/algs/5/513.ins.c.html">insert (C and Pascal)</A> both of which use the auxiliary function <A HREF="javascript:if(confirm('http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.dcc.uchile.cl/%7Eoalonso/handbook/algs/5/513.sift.c.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://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.dcc.uchile.cl/%7Eoalonso/handbook/algs/5/513.sift.c.html'" tppabs="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.dcc.uchile.cl/%7Eoalonso/handbook/algs/5/513.sift.c.html">siftup (C and Pascal)</A>, <A HREF="javascript:if(confirm('http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.ee.uwa.edu.au/%7Eplsd210/ds/heaps.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://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.ee.uwa.edu.au/%7Eplsd210/ds/heaps.html'" tppabs="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.ee.uwa.edu.au/%7Eplsd210/ds/heaps.html">explanation, illustrations, and C code</A>, <A HREF="javascript:if(confirm('http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.moorpark.cc.ca.us/%7Ecsalazar/cs20/nonlin.txt \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.moorpark.cc.ca.us/%7Ecsalazar/cs20/nonlin.txt'" tppabs="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.moorpark.cc.ca.us/%7Ecsalazar/cs20/nonlin.txt">(C++)</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>
(<a href="mailto:paul.black@nist.gov">paul.black@nist.gov</a>).
<p>
Entry modified Tue May 11 15:03:49 1999.<BR>
HTML page formatted Wed Dec 22 09:35:29 1999.
<P>
This page's URL is
<A href="heap.html" tppabs="http://hissa.nist.gov/dads/HTML/heap.html">http://hissa.nist.gov/dads/HTML/heap.html</A>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -