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).
1050 Solvers
Return unique values without sorting
588 Solvers
219 Solvers
76 Solvers
Deleting an element in a matrix
325 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!