This problem needs more test cases with the three of a kind appearing before the pair, such as:
1 0 1 0 0 0 0 0 0 0 1 0 1
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 0 1 0 0
407 Solvers
309 Solvers
Back to basics 11 - Max Integer
682 Solvers
Back to basics 25 - Valid variable names
295 Solvers
Arrange vector in ascending order
627 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!