Leetcode 311. Sparse Matrix Multiplication
Multiply two matrices while exploiting sparsity to avoid needless zero multiplications: compute the product of two potentially large, sparse matrices by iterating only over non-zero entries (e.g., using compressed or hash-based representations) to accumulate results efficiently. The challenge is designing a traversal and accumulation strategy that minimizes work compared to the dense O(n^3) approach.
Asked at:
Meta
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Late May, 2025
Meta
Senior
Hello Interview Premium
Your account is free and you can post anonymously if you choose.