A utility function to print the adjacency list representation of graph
static void printGraph ( LinkedList < int > [ ] adj ) { for ( int i = 0 ; i < adj . Length ; i ++ ) { Console . WriteLine ( " STRNEWLINE Adjacency ▁ list ▁ of ▁ vertex ▁ " + i ) ; Console . Write ( " head " ) ; foreach ( var item in adj [ i ] ) { Console . Write ( " ▁ - > ▁ " + item ) ; } Console . WriteLine ( ) ; } }