public void reverseGroup(ListNode preNode, int k) {

        ListNode tail = preNode.next;
        ListNode previous = preNode;
        ListNode current = preNode.next;
        ListNode next = preNode.next.next;

        for (int i = 0; i < k; i++) {
            current.next = previous;
            previous = current;
            current = next;
            next = next == null ? null : next.next;
        }

        preNode.next = previous;
        tail.next = current;
    }