Pergunta de entrevista da empresa Veeva Systems

Given a list of Person objects, group all Person objects which have the same first name. Two first names can be the same if they are aliases of each other. E.g. (Bob and Robert, Elizabeth and Liz, Chris and Christopher) Person objects consist of firstName and lastName Strings and get() methods for each respective variable.

Resposta da entrevista

Sigiloso

21 de mar. de 2018

I solved this problem by using two HashMaps. After completing the problem this way, this segued into a discussion about HashMap implementation details