The elements of the triangular array are stored as a vector in the order…
KVS PGT Computer Science · 2018 · PGT Computer Science
The elements of the triangular array are stored as a vector in the order A[1,1], A[2,1], A[2,2], A[3,1], A[3,2], A[3,3], …, A[n,n]. Assuming that A[1,1] is stored at location 1, addressing function for A[i,j] is given by:
- A.
(i−1)/2 + j
- B.
i(i−1)/2 + j
- C.
i²/2 + j
- D.
(i+j−1)/2
Attempted by 82 students.
Sign up free to check your answer
Sign up freeLoading lesson…