I am learning about the hash tables from "Data Structure and Algorithms in Java" and is a concept that I do not understand Found. For example, I want to create a phone book. I need a hashteble which keeps a person's name as a key and spit your phone back. I understand how to make a hash function to create a numerical index by the name of the person. But when I put a person's name in the hash table from my numerical index, how do I get his phone? How can I connect between these keys and values?
EDIT: I am trying to apply my heash table and I am not using the Java API
You should store a key-value pair in the hash table, not only the key setter method accept the key / value pair, wrap them in the key / value pair frequency and store in the bucket We do. Based on the access method key, calculate the bucket indicator and move through the pairs in search of one with the exact key. Class map can be. Admission can give you some ideas.
No comments:
Post a Comment