Question

Please select file(s) Select file(s) Q9 Double 15 Points Consider inserting the keys 10, 22, 31, 4, 15, 28, 17, 88, 59 into a
0 0
Add a comment Improve this question Transcribed image text
Answer #1

29. Answer:- Linear probing. have hash function. neki) - Chi (k.) +1) mod m where hk=k and m= L. Therefore, ܛܠܚ hck, i) = (ktTherefore, n[171] =(17+1) mod 11=18 mod is als) I [2] =17 1 Next h(88,0)=88 modll30 TO] 288 T[o] is already full = we use nex. Quadratic Probing. Hashing funcion is h(k, ) = (h (k)+ci+ C7 ?)mod m. where nilk) =k and mal1, CIEL, (2= 3. We n(x, y) = (n(8818)=(88:8- 3.82) modll $ 200 mod 11.22 +1[2]=88 Next, h(59,0) = (59 +0+3.8) modll = 59 modul 34 * T4] =59. Slot I [4] ish(15,2)-15 modul 72:(1+ 15 mod 10)) modul =14+241+ 5)2 mod 11 16 modul 1 [5]= 15. Next, n(2810) = (28_mod 1170.(17.28 mod id)010 Answer:- het suppose node x has two children į and z. Х म 123 R2 Case lo Predecessor. The pre dessor of x is the max elem

Add a comment
Know the answer?
Add Answer to:
Please select file(s) Select file(s) Q9 Double 15 Points Consider inserting the keys 10, 22, 31,...
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
  • 3. (20 points) In open addressing with double hashing, we have h(k,i) hi(k)+ih2(k) mod m, where h...

    3. (20 points) In open addressing with double hashing, we have h(k,i) hi(k)+ih2(k) mod m, where hi(k) and h2(k) is an auxiliary functions. In class we saw that h2(k) and m should not have any common divisors (other than 1). Explain what can go wrong if h2(k) and m have a common divisor. In particular, consider following scenario: m- 16, h(k) k mod (m/8) and h2(k)-m/2 and the keys are ranged from 0 to 15. Using this hash function, can...

  • 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]

  • Q8 BST 15 Points Given a BST T with root r write algorithms (pseudocode) to determine:...

    Q8 BST 15 Points Given a BST T with root r write algorithms (pseudocode) to determine: (a) The height of T. (b) The maximum element in T. (c) If T is height balanced. Please select file(s) Select file(s) Q9 Double 15 Points Consider inserting the keys 10, 22, 31, 4, 15, 28, 17, 88,59 into a hash tabl- (1) lend

  • 2. (10 points.) The procedure HASH-SEARCH takes a hash table T[O : m-1) and a key...

    2. (10 points.) The procedure HASH-SEARCH takes a hash table T[O : m-1) and a key k as its parameters. Each element of T is either a key or NIL. The procedure searches for k in T by probing. If it finds k, then it returns the index j where k appears in T. If it cannot find k, then it returns -1. (A procedure very much like HASH-SEARCH is discussed on pages 269–274 of Cormen.) HASH-SEARCH(T, k) i= 0...

  • M Please select file(s) Select file(s) Q5.2 15 Points A 50.0 mL HBr (aq) solution is...

    M Please select file(s) Select file(s) Q5.2 15 Points A 50.0 mL HBr (aq) solution is titrated with 25.78 mL of 0.110 M NaOH. What is the pH of the original solution? Show your work for full credit. How many mol of HBr are present in the sample solution? Enter your answer here mol HBr are present What is the pH of the original 50.0 mL of HBr solution? Enter your answer here pH Please select file(s) Select file(s) Q6...

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