In Search of a Soulmate – codegolf.stackexchange.com

Given a nonempty finite list of integers, output a truthy value if there are exactly two equal entries and all other entries are distinct, and a falsey value otherwise.

Examples

truthy:
[1,1]

For Get Answer – Click here

Leave a Reply

Your email address will not be published. Required fields are marked *