Pergunta de entrevista da empresa AMD

Hashmap + ArrayList based DSA question with 2 follow-ups