311. Sparse Matrix Multiplication

Problem

Given two sparse matrices A and B, return their product AB without using built-in dense matrix multiplication.

Given two sparse matrices A and B, compute their product A × B. A sparse matrix is one where most elements are zero. Use the sparse representation to optimize computation.

Examples
Input: [[[1]],[[-2]]]
Output: [[-2]]
Hints
Related Problems

311. Sparse Matrix Multiplication

Given two sparse matrices A and B, return their product AB without using built-in dense matrix multiplication.