Given an array of size
N = 7
, perform the following operation using
separate
chaining
. Draw the abstract representation of the array on a piece of paper. Trace all
the changes. Use
Multiply-Add-Divide (MAD) for compression method
. The MAD
method maps an integer i as follows:
[
(
ํ
ํ
+
ํ
)
ํ
ํ
ํ
ํ
]
ํ
ํ
ํ
ํ
p is a prime number
a is a number within the range of [1, p-1]
b is a number within the range of [0, p-1]
For this problem, assume p = 107, a = 1, b = 2. The items donโt have any values
associated with them, meaning they are just integers. You will have to rehash when the
number of items, n is greater than the total capacity N, i.e. when n>N. (10 minutes)
a. Insert 37
b. Insert 47
c. Insert 51
d. Delete 37
e. Insert 65
f. Insert 104
g. Insert 8
h. Insert 5
i. Insert 10
j. Insert 7
k. Delete 8