Sparse Matrix Multiplication

Given two integer matrices mat1 and mat2, compute their matrix product mat1 × mat2.

Their dimensions are:

  • mat1 is m × k
  • mat2 is k × n

Return an m × n matrix result, where:

``...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: