1826. Faulty Sensor
ArrayTwo Pointers
Hints
Hint 1
Check for a common prefix of the two arrays.
Hint 2
After this common prefix, there should be one array similar to the other but shifted by one.
Hint 3
If both arrays can be shifted, return -1.
Preparing judge…