I think that in test case 1 the answer should be [1 5].
Maybe the problem statement should specifically exclude the first and last elements?
Sum all integers from 1 to 2^n
8420 Solvers
6371 Solvers
Determine the number of odd integers in a vector
435 Solvers
Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
298 Solvers
103 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!