Sparse Vector and Matrix Product

Asked at LinkedIn · Coding Questions · Difficulty: Hard · Last asked Nov 16, 2025

Design `SparseVector` and `SparseMatrix` classes from scratch, then implement vector-vector and matrix-matrix products without materializing the dense form.

Loading the problem…