Reverse k linked list

/bin/run.sh: line 4: 18 Segmentation fault (core dumped) ./exe

@yyashu123 hey,use k=k%length of linked list at starting.

can i know the reason

i am still getting the error

@yyashu123 hey k=k% length of ll as k may exceed length of ll so you have to make less than length of ll hence you do it,checkout code:

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.

ohh i checked out thhis code but still the output is not correct

@kshitiz_joshi hey check this code you will get it:https://ide.codingblocks.com/s/295697

1 Like