Algorithm · Oracle · Medium
You are given two sparse matrices, A and B, represented as lists of entry triples. Matrix A has dimensions n by m, and matrix B has dimensions m by p. Each entry in a matrix is given as a tuple (row, col, value), where row and col are zero-based indices and value is a non-zero integer. All entries not listed in the input are assumed to be zero. Compute the standard matrix product $$C = A \times B$$, which will be of size n by p. For every position (i, j) in C, the value is…