a) Suppose you have a hash table of size 12, the keys are words, and the hash function is defined…
a) Suppose you have a hash table of size 12, the keys are words, and the hash function is defined as follows: h (key) =key % hashTableSize
i) Insert the following list of words into an initially empty hash table using quadratic probing. Show the steps for each insertion in the hash table. [pear, kiwi, mango, rambutan, durian, watermelon] The following is quadratic probing equation: hi (key) = (h (key) + 12) % hashTableSize ICT2116 (F) / Page 3 of 5 Use the character code table (Table 1) to convert the given words to numeric key. b c d e f g h i j k l m n o p q r w x y z 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 a S tu v Table 1 (8 marks)
ii) What is the load factor of the resulting table, and how many collisions occurred? (4 marks)
iii) What is the effort (i.e. number of comparisons) involved in checking whether each of the following words are in the hash table: rambutan, banana? marca)
Any citation style (APA, MLA, Chicago/Turabian, Harvard)
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.