I did not understood the line 45-47
head->next = reverseK(n,k);
why are we using head->next ?
head of next will be the next node after head. We are also not updating the head. So head->next will be 2nd element…
and why are we returning prev pointer?
the link of code :