readings. Find out whether any reading occurred more than once.
Return True if at least one value appears in the array two or more times, and False if all values are distinct.readings=[7, 42, -3, 18, 42] → True
The value 42 shows up twice, at positions 1 and 4.
readings=[5, -5, 0, 50] → False
All four values differ, even though 5 and -5 have the same absolute value.
readings=[9] → False
A single value has nothing to repeat with.
readings.length ≤ 10⁵readings[i] ≤ 10⁹readings=[7, 42, -3, 18, 42]
True
Run checks the first 3 tests in your browser. Submit checks all 94 tests on the server, hidden ones included.