Reverses only a sublist from position left to right in-place using the head-insertion trick; O(n).
## What is it?
Reverse only the nodes of a linked list from position `left` to position `right` (1-indexed) in-place.
## How it works
- Use a dummy node before `head`
- Move to the node just before position `left` — call it `pre`
- Reverse the sublist from `left` to `right` using the standard reversal algorithm
- Reconnect: `pre.next` → new head of reversed sublist; tail of reversed sublist → node after position `right`
**One-pass "head insertion" trick:**
- For each node in the range, detach it and insert after `pre` — this naturally reverses the sublist
## When to use
- Reverse k-group problems (generalization)
- In-place sublist manipulation
- Rotation and reorder problems on linked lists
## Key Points
- O(n) time, O(1) space
- The dummy node eliminates the edge case where `left == 1`
- Be careful with boundary connections to avoid losing nodes