Reported interview periodNot available
Reverse a Singly Linked List
Given the head of a singly linked list, reverse its links in place and return the new head.
Practice focusDo not allocate a second list. An empty list and a one-node list should be returned unchanged. The iterative solution should use O(1) auxiliary space. Staged follow-ups 1. Provide a recursive implementation and compare its space usage. 2. Reverse only the nodes between positions left and right . 3. Reverse nodes in fixed-size groups while leaving a final short group unchanged.