[0, 2, 2, 5, 7] could have become [5, 7, 0, 2, 2]. The result is the array values.
Return True if value appears in values, otherwise False.
Use as few steps as you can. Think about how repeats affect the speed compared to the case of distinct numbers.values=[6, 6, 8, 1, 3, 3, 6], value=3 → True
This is [1, 3, 3, 6, 6, 6, 8] shifted to start at a 6. It does contain a 3.
values=[6, 6, 8, 1, 3, 3, 6], value=5 → False
There is no 5.
values=[4, 4, 4, 0, 4], value=0 → True
values is a non-decreasing array shifted cyclicallyvalues=[6, 6, 8, 1, 3, 3, 6], value=3
True
Run checks the first 3 tests in your browser. Submit checks all 77 tests on the server, hidden ones included.