Question

Show the hash table of size 11 after inserting entries with keys 34, 29, 53, 44, 120, 39, 45, and 40, using quadratic probing.

Solution

Verified
Answered 1 year ago
Answered 1 year ago
Step 1
1 of 3

Hash table size N=11

K=34,29,53,44,120,39,45,40

$\textbf{Quadratic probing (k+j2)(\text{k+j}^2) %N}$

h (34) =34%11=1

h (29) =29%11=7

h (53) =53%11=9

h (44) =44%11=0

h (120) =120%11=10

h (39) =39%11=6

h (45) =45%11=1 (index 1 is already filled)

(k+j2)%=(1+11)%11=2(\text{k+j}^2) \%\text{N }= (1+1*1) \%11=2

h(45)=2

h (40) =40%11=7 (index 7 is already filled)

(k+j2)(\text{k+j}^2) % N= (7+1*1) %11=8

h(40)=8

Hash Table\textbf{Hash Table}

Create an account to view solutions

By signing up, you accept Quizlet's Terms of Service and Privacy Policy
Continue with GoogleContinue with Facebook

Create an account to view solutions

By signing up, you accept Quizlet's Terms of Service and Privacy Policy
Continue with GoogleContinue with Facebook

Recommended textbook solutions

Computer Organization and Design MIPS Edition: The Hardware/Software Interface 5th Edition by David A. Patterson, John L. Hennessy

Computer Organization and Design MIPS Edition: The Hardware/Software Interface

5th EditionISBN: 9780124077263 (3 more)David A. Patterson, John L. Hennessy
220 solutions
Intro to Java Programming, Comprehensive Version 10th Edition by Y. Daniel Liang

Intro to Java Programming, Comprehensive Version

10th EditionISBN: 9780133761313 (4 more)Y. Daniel Liang
1,626 solutions
Fundamentals of Database Systems 7th Edition by Ramez Elmasri, Shamkant B. Navathe

Fundamentals of Database Systems

7th EditionISBN: 9780133970777 (3 more)Ramez Elmasri, Shamkant B. Navathe
687 solutions
Introduction to Algorithms 3rd Edition by Charles E. Leiserson, Clifford Stein, Ronald L. Rivest, Thomas H. Cormen

Introduction to Algorithms

3rd EditionISBN: 9780262033848 (4 more)Charles E. Leiserson, Clifford Stein, Ronald L. Rivest, Thomas H. Cormen
726 solutions

More related questions

1/4

1/7