public ListNode reverseKGroup(ListNode head, int k) {
		if (k == 0 || k == 1)
			return head;
		ListNode res = new ListNode(-1);
		ListNode ptr = res;
		ListNode init = head;
		while (head != null) {
			Stack<ListNode> stack = new Stack<ListNode>();
			int count = 0;
			while (count++ < k && head != null) {
				stack.add(head);
				head = head.next;
			}
			// not enough node remains
			if (count <= k)
				break;
			ListNode temp = stack.pop();
			ptr.next = temp;
			ListNode nextRound = temp.next;
			while (!stack.isEmpty()) {
				ListNode node = stack.pop();
				temp.next = node;
				temp = node;
			}
			temp.next = nextRound;
			ptr = temp;
		}
		// if k > sizeof(head)
		if (res.next == null)
			return init;
		return res.next;
	}