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?
Find the two most distant points
1642 Solvers
349 Solvers
Check if number exists in vector
4681 Solvers
Vector of numbers divisible by 3
128 Solvers
275 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!