Pergunta de entrevista da empresa Quantcast

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

Respostas da entrevista

Sigiloso

21 de fev. de 2015

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

5

Sigiloso

24 de set. de 2016

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

1

Sigiloso

15 de dez. de 2016

How about just inserting everything to a set