TestHash.cpp
as the function
HashFunction
.
If you run TestHash
piping
CourseCodes
in as standard input, TestHash
will report the number of collisions that your hash function causes
for the course codes.
Obviously zero collisions is optimal, but that may be hard to achieve.
If your function achieves less than 30% clashes you'll get 1.5% for the labtask, less than 45% clashes you'll get 1.0%, less than 60% you'll get 0.5%, and if you get more than 60% you'll get 0%.