Question: Write a r ecursive function in C++ that checks if an array of ints is a palindrome. For example, {5, 2, 1, 2 ,5} would
Write a recursive function in C++ that checks if an array of ints is a palindrome. For example, {5, 2, 1, 2 ,5} would be a palindrome but {5, 2, 1, 5} would not be a palindrome. Return true if the array is a palindrome and false it is not. Note that any array of where size < 2 is automatically a palindrome.
Prototype: bool isPalindrome(int nums[], int size);
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
