values. A one-off is a value that occurs in the array exactly once.
Return the sum of all one-offs, or 0 if there are none.values=[6, 3, 6, 8, 2, 3] → 10
6 and 3 each appear twice. Only 8 and 2 appear once, so the sum is 10.
values=[4, 4, 4] → 0
There are no one-off values, so the answer is 0.
values=[6, 3, 6, 8, 2, 3]
10
Run checks the first 3 tests in your browser. Submit checks all 98 tests on the server, hidden ones included.