I’m getting runtime error in this challenge.Please check for any kind of mistakes.
Linked List Palindrome
@prashantverma.vn
Hello Prashant
hint -
- check line no 66 .
- swap if statements ( line no - 68,72) first check for case fast==NULL then fast->next==NULL
I did…please check.Still no output.
@prashantverma.vn
a) (line no - 66) fast pointer should be updated as fast=fast->next->next (if u forgot this slow ,fast approach then pls revise )
b)(line no - 92) you have commented out else part
c) In your reverse function you forgot to update your head pointer
Yeah I remember, fast will move two steps and slow one step but did a silly mistake in writiing code
It’s working now…
Thanks for the help:)
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.