I've tested all permutations, bainhome, and the test suite results are correct. Test case 4 is due to ABABA and BAAAB, which are two different cases. It is not possible to do the same with test case 5. Since A and B are repeated even times.
Find the longest sequence of 1's in a binary sequence.
3414 Solvers
151 Solvers
Wind outward from the center ...
67 Solvers
3204 Solvers
126 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!