hi,im doing my assignment,,but sadly i dnt knw how to do...help me please b4 19april2010
Code a hash function, which computes the index number based on the MMU ID, which is
a 10-digit key. The hashing algorithm used to compute the hash index is given as follows:
• Partition the 10-digit key (yyyyyzzzzz) into two 5-digit numbers: yyyyy and
zzzzz.
• Add the two partitioned numbers, yyyyy and zzzzz.
• Truncate the addition result, and keep only the last three digits.
Use the function header given below. The function will accept an unsigned integer, ID
which stores the MMU ID, compute accordingly and return the computed hash index.
int hashfunc(unsign ed int ID);
What is your MMU ID? _______________ _______
What is the hash index based on your MMU ID? _______________ _______
Code a hash function, which computes the index number based on the MMU ID, which is
a 10-digit key. The hashing algorithm used to compute the hash index is given as follows:
• Partition the 10-digit key (yyyyyzzzzz) into two 5-digit numbers: yyyyy and
zzzzz.
• Add the two partitioned numbers, yyyyy and zzzzz.
• Truncate the addition result, and keep only the last three digits.
Use the function header given below. The function will accept an unsigned integer, ID
which stores the MMU ID, compute accordingly and return the computed hash index.
int hashfunc(unsign ed int ID);
What is your MMU ID? _______________ _______
What is the hash index based on your MMU ID? _______________ _______
Comment