CSCI 321 Assign 01: Hashing Please save your project as YourLastNameAssign01 (filling in YourLastName for your actual last name). Hand in a zipped folder of the entire Eclipse project to Blackboard by...


CSCI 321 Assign 01: Hashing
Please save your project as YourLastNameAssign01 (filling in YourLastName for your actual last name). Hand in a zipped folder of the entire Eclipse project to Blackboard by the due date. No late assignments will be accepted. This assignment is to be completed ON YOUR OWN! Any online resources used extensively should be cited in your code!
You have been instructed to implement a program to store data via a custom hashing solution. Your solution must use bucket hashing and use two different hash functions. When an item is to be placed into the hashtable, you must calculate the hash code for each of the two algorithms. The new item should be inserted into the bucket that has the fewest entries. If they have the same amount of items, use hash function 1. If both buckets are full, you will use the overflow bucket.
The hash functions you will use are very simple and not meant to be reflective of a realistic, secure hash function. This is just meant to be an exercise in understanding the process of hashing  The descriptions for each hash function are as follows:
Hash Function 1: Take the length of the key (the word to be defined), multiply it by 17 and mod it by the number of buckets.
Hash Function 2: Take the Unicode value of the first character in the word and mod it by the number of buckets.
For your implementation, the key-value pair you are storing in the hash table is a word with its definition. Sample input files are given on Blackboard. Each input file follows the format of word semicolon space definition. You must read from the input file, and load each of the key-value pairs into the hash table. Note: the semicolon and space should not be stored in the hashtable.

Sep 29, 2019CSCI 321
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here