{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

HW06_sln

# HW06_sln - CSE310 HW06 Thursday Due Thursday A Please note...

This preview shows pages 1–2. Sign up to view the full content.

CSE310 HW06, Thursday, 04/22/2010, Due: Thursday, 04/29/2010 Please note that you have to typeset your assignment using either L A T E X or Microsoft Word. Hand-written assignment will not be graded. You need to submit a hardcopy before the lecture on the due date. You also need to submit an electronic version at the digital drop box. For the electronic version, you should name your file using the format HW06-LastName-FirstName. 1. (5 pts) Assume that a hash table has 7 slots and the hash function is h ( k ) = k mod 7. Demonstrate the insertion of the keys 5 , 28 , 19 , 15 , 20 , 33 , 12 , 17 , 10 into the hash table with collisions resolved by chaining. Solution: The resulted hash table is: 0 28 1 15 2 3 10 17 4 5 12 33 19 5 6 20 Grading Keys: +0.5pts for each correct map; +0.5pts for correct chaining. 2. (5 pts) Consider a hash table of size m = 100 and a corresponding hash function h ( k ) = b m ( k A mod 1) c for A = 0 . 618. Compute the locations to which the keys 61 , 62 , 63 , 64 , 65 are mapped.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 5

HW06_sln - CSE310 HW06 Thursday Due Thursday A Please note...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online