Traverse through remaining nodes
count = 0 NEW_LINE curr = head . next NEW_LINE while ( curr != None ) : NEW_LINE INDENT if ( curr . data in s ) : NEW_LINE INDENT count = count + 1 NEW_LINE DEDENT s . add ( curr . data ) NEW_LINE curr = curr . next NEW_LINE DEDENT