numbers. Call a number **honest** if it appears in the array exactly as many times as its own value: 2 twice, 5 five times, and so on.
Return the largest honest number. If there is none, return -1.numbers=[3, 1, 3, 4, 3] → 3
3 occurs 3 times and 1 occurs once. Both qualify, and the larger is 3.
numbers=[2, 5, 5] → -1
2 occurs once and 5 occurs twice, so no number qualifies.
numbers=[1] → 1
numbers=[3, 1, 3, 4, 3]
3
Run checks the first 3 tests in your browser. Submit checks all 64 tests on the server, hidden ones included.