All Problems

Dot Product of Two Sparse Vectors

MediummathExpected: O(min(k1, k2) time, O(k1 + k2) spaceInterview Context
hash-map

Problem

Design a class that takes a sparse vector and computes the dot product with another sparse vector efficiently.

Loading...