Microsoft·Software Engineer·Technical Phone Screen
- Given the head of a singly linked list and an integer k, reverse the nodes in groups of k in-place. If the final group has fewer than k nodes, leave them as-is. Walk through your algorithm and implement it.
“I knew the rough idea pretty fast, reverse chunks of k, stitch them back together, move on.”