Question

Hash the values 94, 11, 39, 20, 16, 5, 12, 44, 13, 88 and 23 into a hash table with 11 slots. Handle collisions by linear probing. Use the hash function: h(i) (3 * i + 5) % 11 Type in each key on the same line as the index of the slot where it is eventually inserted. YOUR ANSWER TO QUESTION A: 0: 1: 2: 3: 5: 7: 9: 10:

0 0
Add a comment Improve this question Transcribed image text
Answer #1

hinear leicbing No. Date Tuseut 94 hi)-gy x3+5.11-1 Tnseut at wndek Twselt 1 hli) 1X3+5 11 = 5 tuekt ats 3) Tuseut 39 hli)- (2 No. Date Tweut y4 hti) 44x3+5) o 1-5 Next useut at 6 Besee aftes 5u 6 Alot aTuseut 13 hli) 13X3+5)/O Next feee dlot after oHash table 2 39 3 13 4% 23 11 6 8 7 88 8: 12 9: 16Nesl double Hashing his (3*its) /- LI h27-Ck 7) Tuseut 94 a4x3+5)7 11=L 16 embtt seut at 2 tnseut |1 (11x3+5)7-1-5 5 s empty5) wseut 16 (5+ 2xs 5t 315 buee dtet, dseut tuee St 4x5 5+515 54 645 6) Tuseut 5 (Sx3+5)/11 6ee 7-C97.7) S 9+5 711-3 9 nseut5+ 2x5) 4 not fuee (5+ 3x5)7 1= 1not 6uee 5+ yys 11 3 +5x5)-= 7 5+ 6ys)7 11= 2 at Buee nat buee Broe,nscut at 2 9 Tuseut 13 (Hasn table (double Htang O13 1:qu 2 44 3:S 4:39 723 8:12 9:16 l0: 20

if you like the answer please provide a thumbs up.

Add a comment
Know the answer?
Add Answer to:
Hash the values 94, 11, 39, 20, 16, 5, 12, 44, 13, 88 and 23 into...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • ZOOM Page 7. Apply the following operations on the following Quadratic probing haslh table. Write down all your calculations and changes to the hash table Hashi (key): key % 16 Hash2(key): 11-key % 1...

    ZOOM Page 7. Apply the following operations on the following Quadratic probing haslh table. Write down all your calculations and changes to the hash table Hashi (key): key % 16 Hash2(key): 11-key % 11 Double hashing probing sequence (Hashi (key) + i * Hash2(key)) % 16 149 3 88 a. (5 points)HashInsert(Table, 17) 6 16 7 23 8 24 10 42 12 99 13 14 15 b. (5 points)Hashremove(Table,16) ZOOM Page 7. Apply the following operations on the following Quadratic...

  • #3 [3 points] Sketch a hash table of size N=11, where the hash function is hash(key) = key mod N and quadratic probing is used to resolve collisions, after the following elements are inserted: 20, 42,...

    #3 [3 points] Sketch a hash table of size N=11, where the hash function is hash(key) = key mod N and quadratic probing is used to resolve collisions, after the following elements are inserted: 20, 42, 45, 49, 62, 72, 95. The probes are based on this equation: (H+c1∗i+c2∗i2)mod(N) and c1=1, c2=1. If direct hashing was used to store the same elements as the previous problems (20, 42, 45, 49, 62, 72, 95), what should be the minimum size of...

  • Name: Hash Tables CS 2020 Hw 14 edefine MAX CAPACITY 11 #define R struct HashTable f...

    Name: Hash Tables CS 2020 Hw 14 edefine MAX CAPACITY 11 #define R struct HashTable f int hashtable[MAX CAPACITY]: 1/ table to store values int countj // count of values currently stored int hash1(int value) ( return (value % MAX CAPACITY); int hash2(int value) ( return (R- (value % R)); 1) Use hash1 function and linear probing as a collision resolution strategy, insert the following elements into the correct index of the hash table: 1, 5, 4, 11, 21, 15,...

  • 5. Hashing (a) Consider a hash table with separate chaining of size M = 5 and...

    5. Hashing (a) Consider a hash table with separate chaining of size M = 5 and the hash function h(x) = x mod 5. i. (1) Pick 8 random numbers in the range of 10 to 99 and write the numbers in the picked sequence. Marks will only be given for proper random numbers (e.g., 11, 12, 13, 14 ... or 10, 20, 30, 40, .. are not acceptable random sequences). ii. (2) Draw a sketch of the hash table...

  • 11. (10 Points) Draw the final result after inserting keys 24, 25, 50, 38, 12, 90...

    11. (10 Points) Draw the final result after inserting keys 24, 25, 50, 38, 12, 90 into a hash table with collisions resolved by (a) linear probing, (b) chaining. Let the table have 13 slots with addresses starting at 0, and let the hash function be h(k) k mod 13 (a) (5 Points) Linear Probing 0 1 2 3 4 5 6 789 10 11 12 [ANSWER] (b) (5 Points) Separate Chaining ANSWER]

  • Insert elements into a hash table implemented using chain hashing, as an array of linked list...

    Insert elements into a hash table implemented using chain hashing, as an array of linked list in which each entry slot is as a linked list of key/value pairings that have the same hash (outcome value computed using certain hash function). You are allowed to use “Hash Function”, h(k) = k % x where, x is the value you will need to decide to use, that you find appropriate for this implementation. The main requirements are the following: 1. Input:...

  • please use Java!! We are storing the inventory for our fruit stand in a hash table....

    please use Java!! We are storing the inventory for our fruit stand in a hash table. The attached file shows all the possible key/fruit combinations that can be inserted into your hash table. These are the real price lookup values for the corresponding fruit. Problem Description In this programming assignment, you will implement a hash table class fruitHash. Your hash table must include the following methods: 1) hashFunction(key) This method takes a key as an argument and returns the address...

  • What would be the results of the following code? Create array1 ← [33, 88, 11, 44,...

    What would be the results of the following code? Create array1 ← [33, 88, 11, 44, 99, 55] value ← array1[0] FOR each value in array1 IF(array1[i] < value) THEN value ← array1[i] ENDIF ENDFOR Question 7 options: A) Value contains the lowest value in array1. B) Value contains the highest value in array1. C) Value contains the sum of all the values in array1. D) Value contains the average of the values in array1. Question 8 (1 point) What...

  • Question 11 of 28 0.0 Points 12 44 25 21 You have a theory that people...

    Question 11 of 28 0.0 Points 12 44 25 21 You have a theory that people working on higher floors at Brock are in better physical condition because they must climb more stairs. You give 30 people a fitness test (higher scores indicate better physical fitness). They all work on either the first second or third floor of their building. You get the following data. Raw data (fitness level) in bold, ranked data in regular font. 1st floorRANK1st2nd floorRANK2nd3rd floorRANK3rd...

  • The ExceptionLab class provided: – Creates an array of 100 elements and fills it with random...

    The ExceptionLab class provided: – Creates an array of 100 elements and fills it with random numbers from 1 to 100. – It asks the user for an index value between 0 and 99. – Prints the element at that position. – If a number > 99 is entered by the user, the class will abort with an ArrayIndexOutOfBoundsException • Modify the ExceptionLab: – Add a try-catch clause which intercepts the ArrayIndexOutOfBounds and prints the message: Index value cannot be...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT