How to implement PhoneBook using tries data structure.

Design a data structure to store your contacts: Names of people along with their phone numbers.The data structure should be able to do the following quickly:

  • Add contacts.
  • Lookup the phone number by name.
  • Determine who is calling given their phone number.

To do that:

To implement this we will be using HashMap and Trie data structure. Trie data help us to search and provide suggestion on basis…



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
krishankant singhal

krishankant singhal

Angular,Vuejs,Android,Java,Git developer. i am nerd who want to learn new technologies, goes in depth.