Interview Guides

Given the head of a singly linked list and an integer k, reverse the nodes of the list k at a time and return the modified head. If the number of remaining nodes is less than k, leave that final portion unchanged. The node values must stay attached to their original nodes; only links may be changed.
1 <= number of nodes <= 50000 <= Node.val <= 10001 <= k <= number of nodesO(1) extra space beyond a few pointers