values. Among its even elements, find the one that occurs most often. If several are tied, return the smallest. If there are no even elements at all, return -1.values=[6, 3, 8, 6, 8, 5] → 6
The even values are 6 and 8, both appearing twice; the smaller is 6.
values=[10, 7, 10, 2, 10] → 10
10 appears three times, more than any other even value.
values=[1, 9, 15] → -1
There are no even values.
values=[6, 3, 8, 6, 8, 5]
6
Run checks the first 3 tests in your browser. Submit checks all 110 tests on the server, hidden ones included.