📄 heapify.html
字号:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD W3 HTML 2.0//EN">
<HTML lang="en-US">
<HEAD>
<TITLE>heapify</TITLE>
<META name="description"
content="Definition of heapify,
possibly with links to more information and implementations.">
<META name="keywords" content="heapify">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<H1>heapify</H1>
<P>
(algorithm)
<P>
<strong>Definition:</strong>
Rearrange an <a href="array.html" tppabs="http://hissa.nist.gov/dads/HTML/array.html"><em>array</em></a> in-place so that each <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="heapproperty.html" tppabs="http://hissa.nist.gov/dads/HTML/heapproperty.html"><em>heap property</em></a>, <a href="binaryheap.html" tppabs="http://hissa.nist.gov/dads/HTML/binaryheap.html"><em>binary heap</em></a>.
<P><em>Note:
For an array of <em>n</em> nodes, heapify can be performed in <a href="bigOnotation.html" tppabs="http://hissa.nist.gov/dads/HTML/bigOnotation.html"><em>O(n)</em></a> time under the comparison model. This is usually faster than building a <a href="heap.html" tppabs="http://hissa.nist.gov/dads/HTML/heap.html"><em>heap</em></a> by inserting items one at a time into an empty heap. After LK.</em>
<P>Author: <a href="terms.html#authorPEB" tppabs="http://hissa.nist.gov/dads/terms.html#authorPEB">PEB</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:05:24 1999.<BR>
HTML page formatted Wed Dec 22 09:35:29 1999.
<P>
This page's URL is
<A href="heapify.html" tppabs="http://hissa.nist.gov/dads/HTML/heapify.html">http://hissa.nist.gov/dads/HTML/heapify.html</A>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -