public void insert(Key v)
	{
		// Insert
		pq[++N] = v;
		int i = swim(N);

		// resizing
		if (N >= pq.length - 1)
			pq = resize(pq, 2 * pq.length);

		// Mark the min
		if (minIndex == -1)
			minIndex = i;
		else if (v.compareTo(pq[minIndex]) < 0)
			minIndex = i;
	}