CSE331 Section 2 Homework 7 Due: Friday March 14, 2008 at 11:59am 1. Problem 5.1 on page 208. Do a, b, and c. Correct the typo in text: h(x) = x (mod 10). 2. Implement a program that compares linear probing (LP) and quadratic probing (QP). You will be expected to turn in your source code through handin. It should be pos-sible to compile the source and run your program to verify your times. a. Hash function to be used: Fig. 5.4 on page 188 of Weiss text. b. Input words: hw07words.txt in the same directory as this file. Total 25143 words. c. Your hash table size: 25147 (a prime number). d. Quadratic probing may fail to find a usable location when the table gets full. Your insert function should stop probing after 10000 probes. You should count the number of failures, but you do not need to say which words failed to insert. The 10000 probes from each failure should contribute to your total probe count. e.
This is the end of the preview.
access the rest of the document.