I respect and love hashtables :), but even a balanced binary tree would be great for your phone book application, giving you in the worst case logarithmic complexity and avoiding you for good hash functions, collisions, etc., which are more suitable for huge amount of data.
When I talk about huge data, what I mean refers to the repository. Each time you fill all the buckets in the hash table, you will need to allocate a new repository and rename everything. This can be avoided if you know the size of the data in advance. Balanced trees will not allow you to delve into these problems. The domain must be considered when designing data structures, for example, for storing small devices.
Yavar source share