Palindrome - Linked List

Getting Segmentation fault. Can’t figure out the problem.


made one change
in the condition check
fast!= NULL && fast->next!=NULL
u used || instead of and, neither can be NULL so if fast was becoming null then accessing next pointer of NULL is an error

1 Like

@anishanand3733 hey, if your doubt is solved, please mark it as resolved