This problem requires more test cases. My solution as many others would fail for a case in which the searched substring is not ordered.
Which values occur exactly three times?
3819 Solvers
3378 Solvers
201 Solvers
Create a vector whose elements depend on the previous element
392 Solvers
2343 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!