If I can't implement a perfect hashed algorithm without using a Hashtable or HashMap,then how is it possible to implement this type of data structure?
How to implement a perfect hashed without Hashtable or HashMap?
Collapse
X
-
Implement a customListthat has anAdd(item)method.
In this method, use your custom Hashing algorithm to calculate a Key for the item and check to see if the list already has an item with that key in it.
The items in your list may have to be customized similar to that of a dictionary where they have a "key" and a "value" so that you can check if the list has any item within it with the given key.
Comment