Google interview question

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