Pergunta de entrevista da empresa Perficient

Print all duplicates in a string array.

Resposta da entrevista

Sigiloso

20 de jul. de 2018

2 for loops (O(n^2)) time complexity. Marginally better would be to keep a track of the positions in the string array where reputation/duplication occurs, and skip those positions for future passes. Another way would be to use a hash map.

1