Driver program
public static void Main ( String [ ] args ) { Node head = newNode ( " Geeksforgeeks " ) ; head . next = newNode ( " a " ) ; head . next . next = newNode ( " computer " ) ; head . next . next . next = newNode ( " science " ) ; head . next . next . next . next = newNode ( " portal " ) ; head . next . next . next . next . next = newNode ( " for " ) ; head . next . next . next . next . next . next = newNode ( " geeks " ) ; Console . Write ( " List ▁ before ▁ reverse : ▁ STRNEWLINE " ) ; printList ( head ) ; head = reverse ( head ) ; Console . Write ( " STRNEWLINE STRNEWLINE List ▁ after ▁ reverse : ▁ STRNEWLINE " ) ; printList ( head ) ; } }