Hash tables | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Hash tables

Implement a phone book using hash tables. How to handle the case where a person can have multiple phone numbers.

8th Dec 2018, 2:06 PM
2 Answers
+ 4
Use a list-valued dictionary.
8th Dec 2018, 2:21 PM
Kishalaya Saha
Kishalaya Saha - avatar
You can store a list as the value {'someone':[2819,8313,69381]}
8th Dec 2018, 2:24 PM
Taste - avatar