Interview Question

Interview(Student Candidate)

Design a way to fetch the email address from a person's

  name given that they have thoudands of email-name pairs
Answer

Interview Answer

2 Answers

0

is the data ordered? if it's binary search. otherwise divide and conquer algorithm.

Anonymous on Aug 25, 2013
1

We can design using the HashMap. Using hash of the name as Key. But we have to have unique names.

Anonymous on Oct 21, 2014

Add Answers or Comments

To comment on this, Sign In or Sign Up.