public ListNode reverseK(ListNode head, int k) {
		
		if (head == null || head.next == null) return head;
		ListNode tmp = head;
		int i = 0;
		while (i < k) {
			if (tmp == null) // not enough node to reverse, return null
				return tmp;
			tmp = tmp.next;
			i++;
		}
		i = 0;
		while (i < k) {
			tmp = tmp.next;
			i++;
		}
		i = 0;
		ListNode cur = head;
		ListNode next = head.next;
		while (cur != null && next != null && i < k-1) {
			ListNode loop = next.next;
			cur.next = tmp;
			next.next = cur;
			cur = next;
			next = loop;
			i++;
		}
		// head.next = next;
		// head = next; cannot pass outside the method
		return cur; // reverse of top k nodes (only k nodes)
	}