So the goal here is to find any number that is equal to its immediate neighbors and mark it true. Here is some examples:
x = [2 2 3 4 3 4 6 9 9] y = [1 1 0 0 0 0 0 1 1]
or
x = [2 2 2 2 2 9] y = [1 1 1 1 1 0]
Have fun!
This solution is actually incorrect (but passes the test suite).
All your base are belong to us
425 Solvers
Sum of first n terms of a harmonic progression
188 Solvers
357 Solvers
101 Solvers
1491 Solvers
Solution 783991
This solution takes advantage of the limited test cases where the maximum length of repeated segments is <= 2.