Question d’entretien chez Google

Given two arrays, print all common elements

Réponse à la question d'entretien

Utilisateur anonyme

18 janv. 2011

You can sort the shortest array first and for each element of the longest array, find that element in the fist array. When found if it is not marked, then print it and mark it.