Question: Here is data from sample csv file: The code should work with any num data from csv file. Zip Code ZCTA,Population 1001,16769 1002,29049 1003,10372 1005,5079

 Here is data from sample csv file: The code should work

Here is data from sample csv file: The code should work with any num data from csv file.

Zip Code ZCTA,Population

1001,16769

1002,29049

1003,10372

1005,5079

1007,14649

1008,1263

1009,741

1010,3609

1011,1370

1012,661

1013,23188

1020,29668

3. [Hashing, 40 pts] In this problem, you have to implement (in java) a hash table and test how different load factor impact the performance of hash data structure. Collisions must be resolved by separate chaining . You have been provided a data set for this task is a CSV file (zip- code.csv) with two columns, namely zipcode and population. You have to run the prograrn for load factor = 0.85, = 0.80. 0.75, 0.70, and = 0.65, = 0.60. Note the number of keys for this problem are fixed (see the data file). Therefore the table size is determined by the load factor Your class should be called hash.java and must include the following functions 1. int hash(String key): insert keys using universal hashing. Note keys are of type strings, thus they must be prehashed using the 2. void insert(String key, String data) new entries in the table using 3. String search(String key): return the population from the hash hashCode method for strings Universal hash function( the one we saw in the class) table for a given ZIP code using the ZIP codes as keys 4. Read the CSV file and insert all the entries into the hash table 5. double average length(): Return the average length of the linkedlists 6. double average collision(): return the average number of coli sions 7. Plot the average number of collisions vs load factor Java the command LinkedList [] L= new LinkedList ml will create an array of linkedlist of size m. You are allowed to use inbuild java functions for the linkedlist

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!