Pergunta de entrevista da empresa Zalando

Codility Test: Extracting common elements between two integer arrays in nLogn time

Resposta da entrevista

Sigiloso

10 de nov. de 2019

public class Solution { // DO NOT MODIFY THE LIST. IT IS READ ONLY public ArrayList intersect(final List A, final List B) { int i = 0; int j = 0; ArrayList ans = new ArrayList(); while (i B.get(j)) { j++; } else { i++; } } return ans; } }

1