Reverse Linked List Groups
Given a singly linked list node
, and an integer k
, reverse every k
contiguous group of nodes.
Constraints
n ≤ 100,000
wheren
is the number of nodes innode
https://binarysearch.com/problems/Reverse-Linked-List-Groups
Examples
Example 1
Input
- node =
- k =
2
Output
- answer =
Example 2
Input
- node =
- k =
3
Output
- answer =
Leave a comment