Coding
Reverse Nodes in k-Group
Reverse nodes in k-group in a linked list.
Input: head = [1,2,3,4,5], k = 3
Output: [3,2,1,4,5]
Explanation: The first 3 elements are reversed, while the remaining 2 are left untouched since they don't form a complete group.
Was asked at