LeetCode: https://leetcode.com/problems/reverse-nodes-in-k-group/
Given the head of a linked list and an integer k, reverse nodes in groups of k. If the final group has fewer than k nodes, leave it as is.
1
0
2
1
3
2
4
3
k=2
group=[1, 2]
Step 1 / 3
Step 1:
Identify the first group of k=2 nodes.
Focus: select @ [0, 1]
k=2