values. Find the largest number that appears in it exactly once.
If every number repeats, return -1.values=[6, 2, 11, 6, 11, 4, 2] → 4
11, 6 and 2 each appear twice, while 4 appears once. The answer is 4.
values=[3, 3, 3] → -1
The only number repeats, so there is no single value and the answer is -1.
values=[0] → 0
values=[6, 2, 11, 6, 11, 4, 2]
4
Run checks the first 3 tests in your browser. Submit checks all 89 tests on the server, hidden ones included.