all testcases showing wrong answer
pls tell the correct code
Ll- k reverse problem
@yutikakhanna
you are trying to approach the problem in a wrong manner its seems , u are circularly moving the position of the nodes and not applying a logic to reverse the linked list in groups of k
i have provided a code :
where u are reversing k elements in the linked list then a recursive call is made, and also the head to the linked list is updated
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.