Professional Documents
Culture Documents
Binary Heap:
Insert: worst case 1+logN
Delete Max: Wors 2lgN
D-ary Heap:
Insert: logdN del max: dlogdN max 1
Delete w/ tombstone: cost is 2lnM per insert search & delete
Heapsort:
nlogn worst case. Optimal for time and space, in place sort
Quicksort -> binary search tree
Heapsort -> binary heap tree
BST:
Insert, search, del: 2lnM
Kurskal’s algorithm: eloge e = edge
Prim’s algorithm: lazy: eloge eager: elogv
2-3 trees best case height: log2n worst: log3n
Dijkstra’s time: elogv space: v