Implementing a Priority Queue with a Heap (vector based)
-
Priority Queues are structures with elements and their associated keys.
-
Heap Heap-Order Property: In a heap T, for every node v other than the root, the key stored at v is greater than or equal to the key stored at v's parent.
-
Inorder to implement a Priority Queue with a Heap, we can use a vector and up-heap bubbling algorithm
Bottom-Up Heap Construction
Algorith BottomUpHeap(S):
Input: A sequence S storing n = 2h - 1
Output: A heap T storing the keys in S
HashTable and SkipLists
Binary Search Trees
-
AVL trees
-
Multi-Way Search Trees ( (2,4) Trees )
-
Red-Black Trees
Sorting, Sets, and Selection
-
Merge-Sort
-
Qucik-Sort (In-Place Quick-Sort, Randomized Quick-Sort)
-
Selection:
-
Prune-and-Search
-
Randomized Quick-Select
-
Text Processing
- Pattern Matching Algorithms
- Brute Force
- The Boyer-Moore
- The Knuth-Morris-Pratt
- Tries
- Compressed Tries
- Suffix Tries
- Text Compression
- The Huffman Coding Algorithm
- The Gready Method
Graphs
-
Graph Traversal
-
Depth-First Search
-
Breadth-First Search
-
-
Directed Graphs
-
Transitive Closure
-
Directed Acyclic Graphs
-
-
Shortest Paths
-
Dijkstra's Algorithm
-
-
Minimum Spanning Trees
-
Kruskal's Algorithm
-
The Prim-Jarník Algorithm
-