Heap: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 16: Line 16:
Insert a node in the tree.
Insert a node in the tree.


Also see {{Internal|Data_Structures#INSERT|Data Structures &#124 <tt>INSERT</tt>}}
Also see {{Internal|Data_Structures#INSERT|Data Structures &#124; <tt>INSERT</tt>}}


==<tt>REMOVE-MIN</tt>==
==<tt>REMOVE-MIN</tt>==
Remove the node whose key has the minimum value.
Remove the node whose key has the minimum value.

Revision as of 21:47, 9 October 2021

External

Internal

Overview

This article is about binary heaps. A binary heap data structure is an array where data is placed to form a complete binary tree, plus the index of the last node in the heap. Each element of the array contains a pointer to tree nodes. Each node contains at least a key.

More details CLRS page 151, page 1177.

Supported Operations

INSERT

Insert a node in the tree.

Also see

Data Structures | INSERT

REMOVE-MIN

Remove the node whose key has the minimum value.