Pergunta de entrevista da empresa Criteo

Write a function to find the intersection between two arrays.

Resposta da entrevista

Sigiloso

11 de set. de 2021

there are many ways to write this function. If we want just to use native python language we can do : def inter(l1, l2): l3 = [v for v in l1 if v in l2] return l3 or we can for example use the intersection function like : def inter(l1, l2): l3 = set(l1).intersection(l2) return l3