Ll - k Reverse (reverse method)

what is error in it

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.