Reversing a linked list in groups of given size
Given a single linked list, and an integer k, we need to reverse the linked list in groups of size k. For example consider the following diagram of input and output linked lists for k = 3. There are no tricks involved in the solution for this problem. It is just an implementation challenge where…