How to implement a perfect hashed without Hashtable or HashMap?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dseals22
    New Member
    • Jan 2017
    • 74

    How to implement a perfect hashed without Hashtable or HashMap?

    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?
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    Implement a custom List that has an Add(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

    Working...