Exercise: Hash Tables
Solve a task implementing the addSlow() method in LinearHashTable.
We'll cover the following
Task
Implement an addSlow()
method for adding an element x
to a LinearHashTable
, which simply stores x
in the first null
array entry it finds.
Sample input
100 random elements
Expected output
The expected output will be as follows:
Added 100 elements
Searching
The value 74 is found
The value 32 is found
The value 94 is not found
The value 75 is found
The value 94 is not found
The value 24 is not found
The value 8 is found
The value 43 is not found
The value 3 is not found
The value 47 is found
Create a free account to access the full course.
By signing up, you agree to Educative's Terms of Service and Privacy Policy