Pergunta de entrevista da empresa Palantir Technologies

How do you find the intersection of two arrays?

Resposta da entrevista

Sigiloso

6 de jan. de 2015

Add each element in the first array to a hashset. Iterate through the elements in the second array. If an element is in the hashset, it is in the intersection.