Data Structures(Linked list representation of graphs)

 Linked list representation of graphs:


    1. A graph can be represented using a linked list.

    2. It requires less amount of memory.

    3. For each vertex, a list of adjacent vertices is maintained using a linked list.

    4. Adjacency list of a graph is represented by an array of pointers and each pointer points to the respected linked list of vertex.

    5. Example Consider the diagramenter image description here

Adjacency list of a graph as shown belowenter image description here

Comments

Popular posts from this blog

PHP Array Functions

IMPLEMENTATION OF LRU PAGE REPLACEMENT ALGORITHM

IMPLEMENTATION OF FIFO PAGE REPLACEMENT ALGORITHM