Computer Science, asked by yankita1308, 1 month ago

how can you storee sparse array in memory​

Answers

Answered by mreema2002
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