Flipkart Interview Question
Software Engineer / DevelopersFor a small phonebook ,a 2-D matrix would work having name*phone-number entries.
For larger one, use a suffix tree which stores phone number and name alike as strings. This also gives the feature of listing all possible entries for a partial entry.
Other option is to have 2 maps, phone-name and name-map.
was the questions written on machine, i mean did u wrote runnable code?
- netappreject June 26, 2010