CSE 214 : Computer Science 2

Heap Binary Search Tree
Insert

data[HeapSize-1] = item;
FixHeap(HeapSize-1);

Traverse to position

Remove

ret = data[0];
data[i] = data[--heapsize];
FixHeap(0);

move (Left1 as right as possible) to node