https://ide.codingblocks.com/s/39701
my code for https://hack.codingblocks.com/contests/c/537/234
its not able to pass just one test case, why so?
a prompt reply will be appreciated
thanks
https://ide.codingblocks.com/s/39701
my code for https://hack.codingblocks.com/contests/c/537/234
its not able to pass just one test case, why so?
a prompt reply will be appreciated
thanks
Hey your code is completely wrong
It gives true even for input like
abca
which is not a palindrome
Your answer would become true even if only the first and last character match!!!
Try to attempt it again.
Hey, sorry, I had put in the wrong URL, have now edited it, this did not pass one test case
Hey, I have put in the correct URL now, This code is not passing 1 test case
I have basically broken the string into 2 halves, traversing 1st half from left to right and comparing it with the 2nd half, which is being traversed in reverse (R to L). If anywhere, the char in left and right half is not the same, bool variable p=false, and loop breaks and it is not a palindrome
whats wrong or what factor am i missing?
thanks
Hey Apoorva, Where have you mentioned your correct URL?
https://ide.codingblocks.com/s/39701
here, I edited the previous post
https://hack.codingblocks.com/contests/c/537/234
its not able to pass just one test case, why so?
Hey Apoorva, your code is not correct, there are some small changes which I’m doing in your code. you can refer this your updated code. I have also commented the changes in the code.
Hey, thanks, and I just want to ask what was the problem with that code exactly?