This problem requires more test cases. My solution as many others would fail for a case in which the searched substring is not ordered.
895 Solvers
253 Solvers
580 Solvers
171 Solvers
498 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!