Consider a n × n tri-diagonal sparse matrix A. Suppose we want to store sparse…
DSSSB TGT/PGT · 2021 · PGT Computer Science (Male) · Section II: subjectDSSSB TGT/PGT · 2021 · PGT Computer Science (Female) · Section II: subject
Consider a n × n tri-diagonal sparse matrix A. Suppose we want to store sparse A in a one-dimensional array. What is the index of the (i,j)th element of A in the one-dimensional array.
- A.
2i + 2j
- B.
2i + j – 2
- C.
i + j
- D.
i + j − 1
Attempted by 1358 students.
Sign up free to check your answer
Sign up freeLoading lesson…