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