I've been trying to solve this question, but I can't figure out why its not doing what its supposed to do, which is checking if a given array is palindromic or not.
I am pretty sure that the problem lies in the loop of the function, where it will check that the first two are equal and return true. What I don't know to implement is how to keep it checking until it has completely verified that all cell values are equal to their opposite counterpart...
UPDATE: I modified it so it could work, but I feel that my solution is kind of sloppy and inefficient. I would really appreciate it if someone could help me implement this with a for loop...
After looking at recursion examples, We weren't taught to use it, and questions are usually given to us with specific requirements so I assume that I can't use recursion even if it was a solution...
Have a count in your function to count how many are equal. Then compare the count with the size/2. This will work if you're checking if the whole array is a palindrome.