Basic structures and algorithms

xiaoxiao2021-03-06  63

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 algorithmsms

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 SECH

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

转载请注明原文地址:https://www.9cbs.com/read-119011.html

New Post(0)