what is error in it
Ll - k Reverse (reverse method)
check this edited code sir
Hey @vikashkmr519,
First of all insert β{β after line 232. Also, you donβt need the if condition before starting with the while loop in reverse function. And, you need to update the head too when you are calling the reverse function in Main. I have updated the code, please refer and ping me back for any queries https://ide.codingblocks.com/s/147877
Instead of list.reverse(list.head,k); you need to use list.head = list.reverse(list.head, k);
Because we need to store the updated head as well.