Palindrome linked list or not

My code is not passing one test case can u plz spot out the mistake

Hey @coderajay03
Replace Line 114 by

half=len/2+1;  //here added +1 

Check for test case [1 2 1]

okay yes that was a mistake but why it was passing then for other no.of odd terms.

Ans to that might be false
so it never reached to centre in that case

okay okay thankyou bhaiya

1 Like