You are given an array of numbers in which two numbers occur once and the rest occur only twice. Your task is to return the sum of the numbers that occur only once.
repeats([4,5,7,5,4,8]) = 15 because only the numbers
8 occur once, and their sum is
15. Every other number occurs twice.
The solution in Python code
Test cases to validate our solution