ServiceNow Interview Question

Linked List reverse the K nodes