Function to return the count of distinct absolute values in the linked list
def distinctCount ( head_ref1 ) : NEW_LINE INDENT s = set ( ) NEW_LINE ptr1 = head_ref1 NEW_LINE while ( ptr1 != None ) : NEW_LINE INDENT s . add ( abs ( ptr1 . data ) ) NEW_LINE ptr1 = ptr1 . next NEW_LINE DEDENT return len ( s ) NEW_LINE DEDENT