Question d’entretien chez Quantcast

Remove duplicates. I could not solve it without sorting the array first.

Réponses aux questions d'entretien

Utilisateur anonyme

21 févr. 2015

Just use a hash table, both time and space are O(n)

5

Utilisateur anonyme

24 sept. 2016

It depends. If only 1 dup, you can do it by O(n) time and O(1) space by 2 runner

1

Utilisateur anonyme

15 déc. 2016

How about just inserting everything to a set