void kthreverse(node*head , int k ){
if (head == NULL || head->next == NULL)
{
return ;
}
node*prev = head;
node*temp = head;
node*n = head;
while(n != NULL){
int b = k;
while(b--){
temp = temp->next;
}
prev->next = temp->next;
temp->next = prev;
n = prev->next;
}
print_ll(head);
}
what this code doesnt work?