Plz correct this code
hi @rakesh800650 first of all the question requires you to write a recursive solution, but you have written an iterative solution, so i’d suggest you to try that. I have corrected your iterative solution https://ide.codingblocks.com/s/260818
The problem is, that currently, suppose a[0] == a[n-1], you will just return true, without even checking the rest of the array. But you have to ensure that the WHOLE array is a palindrome. So keep checking if the elements match, and if they dont, then return false, because then there is no need to further check the array.
madam it is showing compiling error plzz correct this i don’t know what changes i will have to do so that i can fix this problem
hi @devwrath1999 it is working for me. Anyway, please try to write the recursive solution as that is the point of the whole exercise!
Madam this question from string that comes first in online course means before recursion
And u are saying right this is working fine in coding block ide but when I put this on where we have to satisfy cases there it is not working
@rakesh800650 i submitted my code on hackerblocks and it passed all the test cases. If you are submitting some other code then you need to share that code as well.
I am pasting same code which u have send me and I am submitting it on course section but it showing error
@rakesh800650 that is not possible, you must have made some changes. Please share the exact code that you submitted.
Madam this is the code
@rakesh800650 that is not what is showing in your submissions, this code is running perfectly fine and passed all the test cases, I checked myself.
Thanks
I hard refresh site and than put it again it is working perfect now
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.
