how can you storee sparse array in memory
Answers
Answered by
0
Explanation:
A sparse matrix is stored using 3 arrays: Val[N]: contains the value of the non-zero elements. Row[N]: contains the row-index of the non-zero elements. Col[N]: contains the column -index of the non-zero elements.
...
Rows are stored consecutively:
Elements of row 0 are stored first.
Elements of row 1 are stored next.
And so on.
Similar questions