Question discussion

A 100 × 100 sparse matrix has 50 non-zero elements. It is stored in the triplet (row, column, value) form, with an extra first row that hol…

2327Medium DSSSB TGT Computer Science 0 replies

A 100 × 100 sparse matrix has 50 non-zero elements. It is stored in the triplet (row, column, value) form, with an extra first row that holds the number of rows, the number of columns and the number of non-zero elements. How many numbers are stored altogether?

  • A10,000
  • B153
  • C150
  • D200
Correct answer: B

Explanation

There are 50 triplets plus one header triplet, i.e. 51 rows of 3 numbers each = 153 numbers, instead of 10,000 for the full matrix.

Discussion 0

Nobody has replied yet. Start the discussion!