question:
isPalindrome( coding blocks question)
answer:
question:
isPalindrome( coding blocks question)
answer:
@aarijrab the input format is given as numbers, then why are you taking input for characters? Moreover you are taking input by getline, which takes input till newline character, but here each number is given in a new line in the input format, did you see that?
@aarijrab moreover you have to write a recursive function to check if the array is a palindrome or not, and you have written an iterative function, that too for character arrays
i am clueless …could you send me the code…or modify me code…i am totally clueless
hi @aarijrab dont worry! start from the smallest thing and then build the code from there. First you need to correct the input format.
So take input for a number and store it in a variable n.
then make an int array of size n
then take n more inputs and store these numbers in the array you just created.
Write this much code and then i’ll discuss the logic for checking palindrome
my two test cases have passed, rest two are not passing…if possible could you please send me the correct code for this program
@aarijrab did you close/reopen your doubt? as i can no longer see it. I already pointed out the mistake in your logic please fix that, and if you made any changes share the latest code using CB IDE