+1 vote
in Data Structures & Algorithms I by (110k points)
Which of the following is not the method to represent Sparse Matrix?

(a) Dictionary of Keys

(b) Linked List

(c) Array

(d) Heap

I want to ask this question from Arrays Types topic in division Arrays Types of Data Structures & Algorithms I

I have been asked this question in a job interview.

1 Answer

+1 vote
by (408k points)
selected by
Best answer
The correct choice is (d) Heap

Easy explanation - Heap is not used to represent Sparse Matrix while in Dictionary, rows and column numbers are used as Keys and values as Matrix entries, Linked List is used with each node of Four fields (Row, Column, Value, Next Node) (2D array is used to represent the Sparse Matrix with three fields (Row, Column, Value).

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.