we defined list of arrays for graph implementation.
list *l;
l=new list v[];
then for printing the no.
we write
for (i=0; i<v; i++) // v is the no. of vertices or the no. of arrays which can be stored
{
cout<<i<<"->";
for (int vertex: l[i]) // MY DOUBT IS THIS STEP
cout<<l[i];
}
what is the significance of the step i mentioned as my doubt ?
also i dont know how for loop can be used by this?
also if we could do this with normal for loop?
thankyou