public ListNode reverseKGroup(ListNode head, int k) {
		if (head == null || head.next == null) {
			return head;
		}
		ListNode pre = new ListNode(0);
		pre.next = head;
		head = pre;

		ListNode cur = pre.next;
		while (cur != null) {
			int counter = k;
			while (cur != null && counter > 1) {
				cur = cur.next;
				counter--;
			}
			if (cur != null) {
				cur = pre.next;
				counter = k;
				while (counter > 1) {
					ListNode temp = cur.next;
					cur.next = temp.next;
					temp.next = pre.next;
					pre.next = temp;
					counter--;
				}
				pre = cur;
				cur = pre.next;

			}
		}
		return head.next;
	}