Please enable JavaScript.
Coggle requires JavaScript to display documents.
MM9 - Coggle Diagram
MM9
Heap
properties
-
-
-
A heap can be implemented as an array by recording its elements in the top-down, left-to-right fashion
heap's elements in positions 1 through n, with h[0] unused or as a sentinel
The parental node keys are in the first n/2 positions of the array while the leaf keys are in the last n/2 positions
-
H[i] >= max(H[2i], H[2i+1]) and if 2i+1>n, H[i] >= H[2i]
-
-
Definition: binary tree with keys assigned to its nodes, one key per node
Heap Sort
-
-
runs more slowly than quicksort but can be competitive with mergesort (does not require any extra storage)
-
heap deletion
Maximum Key Deletion
-
-
(3) "Heapify" the smaller tree by sifting K down the tree exactly in the same way as the bottom-up heap algorithm
-