ServiceNow interview question

Linked List reverse the K nodes