engineering recuitment GATE CSE 2023-24 Test Series Programming and Data Structure Programming in C Array
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.
1
2i + 2j
2
i + j - 1
3
i + j
4
2i + j - 2