+ 1
Single linked list get nth node from end
https://code.sololearn.com/c6lZv0Zjpf9c hi friends here is my code ......getting nth node from end i am getting segmentation fault core dumped please find the get_node() function ....please correct
1 Answer
+ 2
I think it's inside the if(count >= n) statement, the count = count - n + 1 should be count = count - n, without the + 1