Suppose you want to write a program that implements a simple phone book. Given a particular name, you want to be able to retrieve that person’s phone number as quickly as possible. What data structure would you use to store the phone book, and why?
Share
the text below answers your question.
the text is from wiki:hashtable.
there are some further discussions, like collision, hash functions… check the wiki page for details.