Pergunta de entrevista da empresa Electronic Arts

Find the distinct elements in two arrays.

Resposta da entrevista

Sigiloso

9 de fev. de 2017

Python: def distinctEle(arr1, arr2): """ :type arr1: List[elements] :type arr2: List[elements] :rtype: List[elements] """ a = [i for i in arr1 if i not in arr2] b = [i for i in arr2 if i not in arr1] a.extend(b) return(list(set(a)))