Function to return number of distinct absolute values present in the linked list
int distinctCount ( Node * head_1 ) { Node * ptr = head_1 ; unordered_set < int > s ; while ( ptr != NULL ) { s . insert ( abs ( ptr -> data ) ) ; ptr = ptr -> next ; } return s . size ( ) ; }