Google Interview Question

Design a function and efficient data structure to compute the inner product of two sparse vectors.