Content deleted Content added
mNo edit summary |
Partially undid revision 1292801804 by Ajmullen (talk) – restored the shorter and more comprehensible variant |
||
Line 29:
*Heap property: the key stored in each node is either greater than or equal to (≥) or less than or equal to (≤) the keys in the node's children, according to some [[total order]].
Heaps where the parent key is greater than or equal to (≥) the child keys are called ''max-heaps''; those where it is less than or equal to (≤) are called ''min-heaps''. Efficient
*Inserting an element;
*Removing the smallest or largest element from (respectively) a min-heap or max-heap.
|