📄 binaryheap.html
字号:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD W3 HTML 2.0//EN">
<HTML lang="en-US">
<HEAD>
<TITLE>binary heap</TITLE>
<META name="description"
content="Definition of binary heap,
possibly with links to more information and implementations.">
<META name="keywords" content="binary heap">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<H1>binary heap</H1>
<P>
(data structure)
<P>
<strong>Definition:</strong>
A <a href="completbintr.html" tppabs="http://hissa.nist.gov/dads/HTML/completbintr.html"><em>complete binary 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 or equal to 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="heapify.html" tppabs="http://hissa.nist.gov/dads/HTML/heapify.html"><em>heapify</em></a>, <a href="karyheap.html" tppabs="http://hissa.nist.gov/dads/HTML/karyheap.html"><em>k-ary heap</em></a>, <a href="heap.html" tppabs="http://hissa.nist.gov/dads/HTML/heap.html"><em>heap</em></a>, <a href="binomialheap.html" tppabs="http://hissa.nist.gov/dads/HTML/binomialheap.html"><em>binomial heap</em></a>.
<P><em>Note:
An <a href="array.html" tppabs="http://hissa.nist.gov/dads/HTML/array.html"><em>array</em></a> implementation stores the keys in an array. The parent of a node is the node's index in the array, divided by two, rounded down. <P> Merging two binary heaps is <a href="bigOnotation.html" tppabs="http://hissa.nist.gov/dads/HTML/bigOnotation.html"><em>O(n)</em></a>: the best you can do is just concatenate two heap arrays and make a heap of the result. Two <a href="binomialheap.html" tppabs="http://hissa.nist.gov/dads/HTML/binomialheap.html"><em>binomial heaps</em></a> can be merged in O(ln n).</em>
<P>Author: <a href="terms.html#authorCLK" tppabs="http://hissa.nist.gov/dads/terms.html#authorCLK">CLK</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 Wed Aug 25 13:04:07 1999.<BR>
HTML page formatted Wed Dec 22 09:34:47 1999.
<P>
This page's URL is
<A href="binaryheap.html" tppabs="http://hissa.nist.gov/dads/HTML/binaryheap.html">http://hissa.nist.gov/dads/HTML/binaryheap.html</A>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -