public ListNode reverseKGroup(ListNode head, int k) {
            if (k == 0) {
                return head;
            }
            ListNode dummy = new ListNode(0);
            dummy.next = head;
            ListNode start = dummy;
            ListNode end = start.next;
            int count = 0;
            while (end != null) {
                if (count == k) {
                    start = reverseGroup(start, end);
                    count = 0;
                }
                count++;
                end = end.next;
            }
            if (count == k) {
                reverseGroup(start, end);
            }
            return dummy.next;
        }