code: @SuppressWarnings("unchecked")
  	private void siftDown (int k, E x) {
  		int half = size >>> 1; // loop while a non-leaf
  		while (k < half) {
  			int child = (k << 1) + 1; // assume left child is least
  			E c = (E)queue[child];
  			int right = child + 1;
  			if (right < size && c.compareTo((E)queue[right]) > 0) c = (E)queue[child = right];
  			if (x.compareTo(c) <= 0) break;
  			queue[k] = c;
  			k = child;
  		}
  		queue[k] = x;
  	}
docs: Inserts item x at position k, maintaining heap invariant by demoting x down the tree repeatedly until it is less than or
  equal to its children or is a leaf.
  
  @param k the position to fill
  @param x the item to insert