CS 14 - Lab 9


CS 14 Homepage

Hash Tables

Note: There will be a lab practical this week.

Hash tables are a wonderful data structure that provides O(1) running time for most operations most of the time, but that can be rendered completely useless when the data fed to them and the hashing function used do not work together well. In lab this week we will be looking at a number of hash functions. Your job is to write up a brief summary of each, describing what the hash function does, when it works well, when it works poorly, and what you think of it overall. Turn in the summary as hashfunctions.txt and also turn in any additional C++ code you generate when testing these functions. For this lab you may work in small groups (1-3 people) for investigating the functions, but everyone must write up their own conclusions.

The functions can be found here: hashfunc.cc. There are 8 functions, a good writeup is worth 1 point each.

© 2003 UC Riverside Department of Computer Science & Engineering. All rights reserved.