Pergunta de entrevista da empresa Lyft

Common integers in two arrays.

Respostas da entrevista

Sigiloso

10 de mai. de 2019

def findCommon(x,y): return list(set(x) & set(y))

Sigiloso

5 de out. de 2020

def commonint(a,b): a_set = set(a) b_set = set(b) if (a_set & b_set): print(a_set & b_set)

Sigiloso

5 de out. de 2020

Interviewer said using a set was not a useful solution. Didn't care that it outperformed their code in performance tests.

Sigiloso

5 de out. de 2020

Interviewer said using a set was not a useful solution. Didn't care that it outperformed their code in performance tests.