Adjacency lists

We can represent a graph using a linked list where one array will be used for vertices and each vertex will have a linked list, which will represent the edges between adjacent vertices. An example graph looks like this when represented in an adjacency list:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset