public ListNode reverseKGroup(ListNode head, int k) {
		if(head == null || head.next == null)
			return head;
		if(k < 2)
			return head;
		ListNode dummy = new ListNode(0);
		dummy.next = head;
		for(ListNode prev = dummy, end = head; end != null; end = prev.next ){
			for(int i = 1; i < k && end != null; ++i){
				end = end.next;
			}
			if(end == null)
				break;
			prev = reverse(prev, prev.next, end);
		}
		return dummy.next;
	}