title: A data structure for a phone book such that it can search a number by name and also search a name by number
body: <p>Do you know a solution to the following interview question?</p>
  
  <blockquote>
    <p>Design a data structure for a phone book that can safely and
    efficiently search a number by name and also search a name by number.</p>
  </blockquote>
  
  <hr>
  
  <p>Details:</p>
  
  <p>The solutions found on stackoverflow are all about hashtables, but, I'd have to build 2 hashtables for that, which requires twice the space.</p>
  
  <p>How to do it with only one data structure in a time- and space-efficient, type-safe manner?</p>