CIS 671, Winter 2002 Homework 0: Partial Map, Binary Search Tree and Hash Table Review
Partial Map.
Define a Partial Map.
Hash Table
Given below is a hash table with 13 spaces. The keys 14,
28, 12, 27, 31, and 38 have been inserted in that order
using the division/remainder hash function and the linear probe (next available space) collision
algorithm.
Insert the
following keys: 34, 15, and 25.
Address
Key
Collision
0
38
1
14
27
2
28
3
27
4
-
5
31
6
-
Address
Key
Collision
7
-
8
-
9
-
10
-
11
-
12
12
38
Binary Search Trees
Given the binary search tree shown below,
insert the keys "D" and "M".
There are several algorithms for traversing a binary tree.
Give the result of traversing the tree above in inorder.
Give the result of traversing the tree above in postorder.
Give the result of traversing the tree above in preorder.
Which algorithm would you use to print the keys in the tree in
alphabetical order? Give this traversal algorithm.