Pergunta de entrevista da empresa Qualcomm

Programming on whiteboard: Efficiently compute the inner product of two sparse vectors.

Resposta da entrevista

Sigiloso

26 de nov. de 2017

Use a hash map for the vectors and then traverse the the hashmap with the fewest number of nonzero entries whilst performing matching lookups on the other array.