I am doing problem on leetcode to reverse a linked list…
I am getting this error … don’t know what it is saying…
https://ibb.co/kKm1XVz <- scrrenshoot…
This is code…
https://ide.codingblocks.com/s/315847
Please tell me what is wrong here
I am doing problem on leetcode to reverse a linked list…
I am getting this error … don’t know what it is saying…
https://ibb.co/kKm1XVz <- scrrenshoot…
This is code…
https://ide.codingblocks.com/s/315847
Please tell me what is wrong here
@ashishnnnnn what if head is NULL, in line 14 you first check head->next which becomes invalid!
so check in this order
if(head==NULL || head->next==NULL)
Thanks… I got this…