Pergunta de entrevista da empresa Microsoft

Given three lists, find all the common elements.

Resposta da entrevista

Sigiloso

3 de nov. de 2011

Just count them with a heap. If the lists can have repeated elements, make sure the same element is not incremented more than once. Save the elements that hold a count greater than 3 and output them.