Exam 3 prep
Data Structures and Algorithms in Java
CpSc 374
Hash Tables
- Given a hash table size,
- Use linear probing to insert a list of numbers
- Use quadratic probing to insert a list of numbers
- Given a hashtable and a second hash function,
use double hashing to insert a list of numbers
- What is a collision?
- What strategies could we use to handle a collision?
Heap
- for the heap above, list the nodes in order that would be
examined to find 9
- for the heap above, list the nodes in order that would be
examined to find 100
- for the heap above, list the nodes in order that would be
examined to find 4
- for the heap above, list the nodes in order that would be
examined to find 80
- for the heap above, give the tree after deleting 98
- for the heap above, give the tree after deleting 75
- for the heap above, give the tree after deleting 9
- for the heap above, give the tree after inserting 3
- for the heap above, give the tree after inserting 100
- for the heap above, give the tree after inserting 81
- if the heap is stored in an array, what are the indices of
the children of the node stored in index 43
- if the heap is stored in an array, what is the index of
the parent of the node stored in index 43
Graphs
- Given a graph, what is the adjacency list of vertices
- Given a graph, what is the adjacency matrix representing the edges
- Given a graph, what is the BST beginning at node 1
- Given a graph, what is the DST beginning at node 1
- Given a directed graph, what is the adjacency matrix representing the edges