It would be beneficial for the problem if zeros were added to test cases, for example [...,1,2,0,-1,-2,...], [...,1,2,3,0,2,3,...], [...1,2,3,0,0,0,1,2,...], [...,1,2,0,0,-1,-2,...], etc.
Additional test cases have been added and the description slightly modified.
17510 Solvers
28046 Solvers
188 Solvers
549 Solvers
373 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!