Utility function to print the circular linked list
void printList ( Node * head ) { if ( head == NULL ) return ; Node * temp = head ; do { cout << temp -> data << " - > " ; temp = temp -> next ; } while ( temp != head ) ; cout << head -> data << endl ; }