Question 24Asked in Bihar STET Paper 2 Computer Science (Class 11-12), 12 Sep 2023, Shift 2

Which of the following representations is most suitable for efficient row-wise traversal of a sparse matrix?

  1. ATriplet representation
  2. BCompressed sparse row (CSR) format
  3. CCompressed sparse column (CSC) format
  4. DArray representation
Show answerHide answer

Correct answer: (B) Compressed sparse row (CSR) format

Explanation

CSR stores the non-zeros row by row with a row-pointer array, so all elements of a row are contiguous and can be traversed efficiently.

From Bihar STET Paper 2 Computer Science (Class 11-12) PYQ, 12 Sep 2023, Shift 2

This is question 24 of Bihar STET Paper 2 Computer Science (Class 11-12) PYQ, 12 Sep 2023, Shift 2. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.