Utility function to print the circular linked list
static void printList ( Node head ) { if ( head == null ) return ; Node temp = head ; do { Console . Write ( temp . data + " - > " ) ; temp = temp . next ; } while ( temp != head ) ; Console . WriteLine ( head . data ) ; }