my code only paases two test cases(https://ide.codingblocks.com/s/262378)
Pallendrome linked list
please rply me…?
You code is working fine for odd length linked lists but it is giving segmentation fault for even length linked list. Dry run your code with an even length linked list and check where it is failing.
Here Segmentation fault is most probably because you are trying to access a NULL node somewhere in your code. NULL->next or NULL->data will result in a segmentation fault. Keeping this in mind try to handle this case.
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.