struct node *ptrint ifor( no_of_nodesi++ptr adj[ ]printf("\ the neighbours of node % are:" )while(ptr !nullprintf("\ % "ptr -vertex)ptr ptr -nextvoid deletegraph (struct node *adj[]int no_of_nodesint istruct node *temp*ptrfor( <no_of_nodesi++ptr adj[ ]while(ptr nulltemp ptrptr ptr -nextfree(temp)adj[inulloutput enter the number of nodes in enter the number of neighbours of enter the neighbour of enter the number of neighbours of enter the neighbour of enter the neighbour of enter the number of neighbours of enter the neighbour of the neighbours of node are the neighbours of node are the neighbours of node are note if the graph in the above program had been weighted graphthen the structure of the node would have beentypedef struct node int vertexint weightstruct node *next} graph traversal algorithms in this sectionwe will discuss how to traverse graphs by traversing graphwe mean the method of examining the nodes and edges of the graph there are two standard methods of graph traversal which we will discuss in this section these two methods are