How a linear datastructure can be used to implement a non linear datastructure
So in matrix representation, we only change the value of a particular cell when the vertex represented by column and row number are connected. And list is simply the list for all the neighbors of a particular vertex. In matrix, we store zeroes for pair of vertices not connected and is extra space.
Basically my questions is how list and matrix can be used to represent the graph, as list and matrix is linear data structure and graph is a non-linear data structure