assign4 - CSE2011F06/HR - Assignment #4 - Due Nov. 8, 06...

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

View Full Document Right Arrow Icon
CSE2011F06/HR - Assignment #4 - Due Nov. 8, 06 Hash Tables and Heaps 1. Given the hash function h(x) = x % 10 , insert the items: {4371, 1323, 6173, 4199, 4344, 9679, 1989} and show the resulting hash table for each of the following collision resolution policies: a. Separate (i.e. external) Chaining. b. Linear Probing. c. Quadratic Probing. d. Double hashing with h 2 (x)=7 - x % 7 . Note that this exercise is based on the textbook's 5.1. 2. Examine the implementation of QuadraticProbingHashTable in the program directory. Modify the findPos so that it also detects the first inactive location on the search path and sets an attribute accordingly. This way, the insert method can reclaim deleted cells, if any, and effectively reduce λ. Hint: The findPos method is used by several methods, not only insert . Your modification should not affect the existing functionality of these other methods. 3. Use the
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

assign4 - CSE2011F06/HR - Assignment #4 - Due Nov. 8, 06...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online