힙 힙 순서 key(v) >= ket(parent(v)) 힙 높이 log�logn 힙을 이용한 우선 순위 큐 구현 힙 삽입 Alg insertItem(k) 1. advanceLast() 2. z= last 3. Set node z to k 4. expandExternal(z) 5. upHeap(z) 6 return Alg upHeap(v) 1. if(isRoot(v)) return 2. if(key(v) >= key(parent(v))) return 3. swapElements(v,parent(v)) 4. upHeap(parent(v)) 힙 삭제 Alg removeMin() 1. k = key(root()) 2. w = last 3. Set root to key(w) 4. retreatLast() - ..