Determine whether the vector is symmetric or not (vector could be even or odd in length).
For example:
x = [1 2 3 3 2 1] is symmetric
x = [1 2 3 4 3 2 1] is symmetric as well!
x = [-1 -2 -3 3 2 1] is not symmetric
Case #3 is not symmetric...please check.
I fixed the wording.
Why the vector from "Test Suite" "Test 3" is symmetric?
x = [-1 0 0 1];
y_correct = 1; %% WHY 1?
I updated test case #3.
Include a test case where first and last are same, but ones in middle aren't (say [1 2 4 3 5 2 1])
I need to learn more.
What if you update the test #3 in test suite?
Swap the first and last columns
9905 Solvers
522 Solvers
533 Solvers
214 Solvers
Flip the vector from right to left
754 Solvers