HASHING PROBLEM

lib525010101 at stat.appstate.edu lib525010101 at stat.appstate.edu
Mon Apr 29 09:55:13 AEST 1991


  Hello, 
  I am new reader of this board.  This is my first attempt 
at posting a message.  I am a graduate student at 
Appalachian State University in Boone, North Carolina.  As 
part of one of my class assignments, I had to learn how to 
the university's VAX computer system to access the NEWS 
Boards.  I have been able to read messages for sometime 
and I think I have finally solved how to send messages to 
the NEWS Boards.  Please forgive me if this message goes a 
fowl. 
  One of my friends in another class has an interesting 
assignment that he has been requesting help with.  I am 
including it below in case some of the readers of this 
board would like to help him. 
                                 Wendell Bunker 
LIB525010101 at stat.appstate.edu 
 
 
From: "O.W.CARROLL" <C_S244010203 at STAT.APPSTATE.EDU> 
Subject: hashing problem 
Assignment to find an Algorithm for the avoidance of 
collisions. 
 Algorithms and Programming 
  Here is a problem being worked on in C! can you Computer 
Science majors help me find the shortest runn time and 
least storage. 
  The program will take in a series of lines from a data 
file, storing their information in appropriate structs 
linked together as nodes. 
Each line contains : 
        the name of a person (18 spaces allotted) 
        the age of that person 
        a process code: U means replace the previous age; 
D is delete the person; A is add the person to the pool. 
  Use an array and hashing techniques to conduct a search 
for the location of each person.  Store the people to be 
added, delete those to be deleted, and update the age of 
those with a U process code. 
  You have a choice of either a linked list or probing to 
resolve conflicts causedby the your hash function. 
  If you probe, you must output a probe count at the end 
of the run.  If you use a linked list, you must give a 
count of each linked list in the array at the end of the 
run. 
  In any case, you must output the final pool of 
individuals at the end of the run. 
  Improvements are welcome. 
  Turn in hardcopy of the program, the final list of 
people and the necessary counts. 
  O.W. Carroll A.S.U Boone N.C. 
$ 



More information about the Comp.lang.c mailing list