# LeetCode 24 – Reverse Nodes in k-group

#### Posted on January 7, 2014

##### Last updated on January 7, 2014

Solution to LeetCode Reverse Nodes in k-group question.

Suppose we have a function called reverse_between(ListNode n, int a, int b) which reverses the linked list rooted at n between elements a and b. The question is then reduced to calling reverse_between multiple times. Here is a Java implementation:

Markdown SHA1: 6f77ec1b680d6a0b530e723b80c9089492fd8291