Docsity

CS245 Midterm 2 Review: Data Structures and Algorithms - Prof. David J. Galles, Study notes of Data Structures and Algorithms

Partial preview of the text

Download CS245 Midterm 2 Review: Data Structures and Algorithms - Prof. David J. Galles and more Study notes Data Structures and Algorithms in PDF only on Docsity!

Data Structures and Algorithms

CS245-2009S-MT2Midterm 2 Review

David Galles

Department of Computer Science University of San Francisco

MT2-0:

n log n Sorting

Merge Sort Quick Sort

Partition Heap sort (examples)

MT2-2:

Hash Tables

Hash functions Open Hashing (closed addressing, separatechaining)

Examples

MT2-3:

Hash Tables

Closed Hashing (open addressing)

Linear Probing

Primary clustering Quadratic Probing Pseudo-Random Double Hashing

(examples)

MT2-5:

Graphs

Adjacency Lists Adjacency Matrices Simple manipulations

Convert adjacency list to adjacency matrix, forinstance

MT2-6:

Graphs

Topological Sort

Calculating indegree Using indegree Finding Cycles

MT2-8:

Graphs – Shortest Path

Dijkstra’s Algorithm

Dijkstra Table Using Heaps Floyd’s Algorithm

MT2-9:

Graphs – Spanning Trees

Kruskal’s Algorithm

Using disjoint sets Prim’s Algorithm

MT2-11:

Binomial Queues

Defintions

Binomial Tree of degree k Merge Insert Remove Min

MT2-12:

AVL Trees

Defintions

BST, height difference of children

Single Rotation / Double Rotation Insert / Remove / Find