A utility function to print the adjacency list representation of graph
void printGraph ( Graph * graph ) { for ( int i = 0 ; i < graph -> V ; ++ i ) { set < int , greater < int > > lst = graph -> adjList [ i ] ; cout << endl << " Adjacency ▁ list ▁ of ▁ vertex ▁ " << i << endl ; for ( auto itr = lst . begin ( ) ; itr != lst . end ( ) ; ++ itr ) cout << * itr << " ▁ " ; cout << endl ; } }