Kth element from last on linked list


Getting runtime error in one test case and 2 cases passed
please tell the reason?

hi @ujj1804_1156aee80205d0bf
1 2 3 4 5 6 -1
6
Ur code gives segmentation fault on this input… try to look into it…

Sir thank you very much i got the mistake .

1 Like

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.