Bartleby Related Questions Icon

Related questions

Question
Like numbers, strings can also be used as keys in a hash functions. A hash function for
any string s="abc" can be defined as:
Hash(abc) = (a + b + c) % tableSize
Consider the following ASCII table for different alphabets and use the hash function to
create a hash table of 10 slots for the following Names using Open addressing
(Linear probing to resolve collision).
Names: ahmed, samir, saad, yazeed, raed, sultan, salman, azzam, saleh, hamad.
Explain the steps showing your work in detail.
a
97
m
109
y
121
b
98
n
110
Z
122
с
99
O
111
d
100
Р
112
e
101
q
113
f
102
r
114
g
103
S
115
h
i j
104 105 106
t
116
k
107
u
V
W
117 118 119
I
108
X
120
expand button
Transcribed Image Text:Like numbers, strings can also be used as keys in a hash functions. A hash function for any string s="abc" can be defined as: Hash(abc) = (a + b + c) % tableSize Consider the following ASCII table for different alphabets and use the hash function to create a hash table of 10 slots for the following Names using Open addressing (Linear probing to resolve collision). Names: ahmed, samir, saad, yazeed, raed, sultan, salman, azzam, saleh, hamad. Explain the steps showing your work in detail. a 97 m 109 y 121 b 98 n 110 Z 122 с 99 O 111 d 100 Р 112 e 101 q 113 f 102 r 114 g 103 S 115 h i j 104 105 106 t 116 k 107 u V W 117 118 119 I 108 X 120
Expert Solution
Check Mark
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS