Perform operations on a sparse matrix representation.
HardProblem Statement
Perform operations on a sparse matrix representation.
Sample Input
Matrix: [[0, 0, 3], [0, 5, 0], [6, 0, 0]]
Sample Output
Original Matrix: 0 0 3 0 5 0 6 0 0 Sparse Matrix: (0, 2, 3), (1, 1, 5), (2, 0, 6) Reconstructed Matrix: 0 0 3 0 5 0 6 0 0
Limits
Time: 2s · Memory: 256 MB
Code Editor
00:00
using System;
using System.Collections.Generic;
class SparseMatrix
{
static void Main()
{
// Perform operations on a sparse matrix
}
}
Input
Matrix: [[0, 0, 3], [0, 5, 0], [6, 0, 0]]
Expected Output
Original Matrix: 0 0 3 0 5 0 6 0 0 Sparse Matrix: (0, 2, 3), (1, 1, 5), (2, 0, 6) Reconstructed Matrix: 0 0 3 0 5 0 6 0 0