Question: Write a Java program that implements a hash-table with the following functionalities: 1. An Array-List of size of 5. 2. Hash function is x%5. 3.
Write a Java program that implements a hash-table with the following functionalities:
1. An Array-List of size of 5.
2. Hash function is x%5.
3. In the main method create a hash-table object and add the following values: (5, 3, 7, 4,18, 2, 6, 8, 11, 5, 1, 9).
4. The hash-table should solve collision problem by inserting the colliding values into a Linked-List.
5. Print the output of index 4 on the screen.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
