Driver code
public static void Main ( String [ ] args ) { Node head = null ; head = insertEnd ( head , getNode ( 1 ) ) ; head = insertEnd ( head , getNode ( 2 ) ) ; head = insertEnd ( head , getNode ( 3 ) ) ; head = insertEnd ( head , getNode ( 4 ) ) ; head = insertEnd ( head , getNode ( 5 ) ) ; Console . Write ( " Current ▁ list : STRNEWLINE " ) ; display ( head ) ; head = reverse ( head ) ; Console . Write ( " STRNEWLINE STRNEWLINE Reversed ▁ list : STRNEWLINE " ) ; display ( head ) ; } }