not using like for( int nbr : l[i] )
using like for( int j=l[i],j<l[i].size() ;j++) .
How to print this list using two loops?
@raj.verma5454 hey this can be format ,suppose you want to print adjacency list for node 0:
for(int i=0;i<adj[0].size();i++)
{
cout<<adj[0][i];
}
Hope you get it.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.