Tap here to switch tabs
Problem
Submissions

Problem: Sparse Matrix Multiplication

med
30 min
Try to solve the Sparse Matrix Multiplication problem.

Statement

Given two sparse matrices mat1 of size m × k and mat2 of size k × n, return the result of matrix multiplication mat1 × mat2.

Constraints:

  • m == mat1.length

  • k == mat1[i].length == mat2.length

  • n == mat2[i].length

  • 1≤1 \leq m, n, k ≤100\leq 100

  • −100≤-100 \leq mat1[i][j], mat2[i][j] ≤100\leq 100

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Sparse Matrix Multiplication

med
30 min
Try to solve the Sparse Matrix Multiplication problem.

Statement

Given two sparse matrices mat1 of size m × k and mat2 of size k × n, return the result of matrix multiplication mat1 × mat2.

Constraints:

  • m == mat1.length

  • k == mat1[i].length == mat2.length

  • n == mat2[i].length

  • 1≤1 \leq m, n, k ≤100\leq 100

  • −100≤-100 \leq mat1[i][j], mat2[i][j] ≤100\leq 100