This solution takes advantage of the limited test cases where the maximum length of repeated segments is <= 2.
This solution is actually incorrect (but passes the test suite).
Determine whether a vector is monotonically increasing
12218 Solvers
10092 Solvers
879 Solvers
152 Solvers
Getting the row and column location from a matrix
244 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!