Pergunta de entrevista da empresa Meta

The dot product between two sparse arrays. A better solution than O(n). You can pre-process the input.