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:

  1. A.

    (i−1)/2 + j

  2. B.

    i(i−1)/2 + j

  3. C.

    i²/2 + j

  4. D.

    (i+j−1)/2

Attempted by 82 students.

Sign up free to check your answer

Sign up free

Explore the full course: Rssb Senior Computer Instructor

Loading lesson…