public class MinHeap {

  private int[] heapArray;
  private int heapSize;

  public MinHeap(int heapSize) {
    this.heapSize = 0;
    this.heapArray = new int[heapSize];
  }

  protected int getMin() {
    if (!this.isEmpty()) {
      return heapArray[0];
    }
    return -1;
  }

  protected boolean isEmpty() {
    return this.heapSize == 0;
  }

  protected int getLeftChildIndex(int index) {
    return 2 * index + 1;
  }

  protected int getRightChildIndex(int index) {
    return 2 * index + 2;
  }

  protected int getParentIndex(int index)  {
    return (index - 1) / 2;
  }

}

@@ -580,10 +580,519 @@
 2;%0A  %7D%0A%0A
+  protected void insert(int value) %7B%0A    if (!this.isEmpty()) %7B%0A      heapSize++;%0A      data%5BheapSize - 1%5D = value;%0A      siftUp(heapSize - 1);%0A    %7D%0A  %7D%0A%0A  protected void siftUp(int index) %7B%0A    int parentIndex, tmp;%0A    if (index != 0) %7B%0A      parentIndex = getParentIndex(index);%0A      if (heapArray%5BparentIndex%5D %3E heapArray%5Bindex%5D) %7B%0A        tmp = heapArray%5BparentIndex%5D;%0A        heapArray%5BparentIndex%5D = heapArray%5Bindex%5D;%0A        heapArray%5Bindex%5D = tmp;%0A        siftUp(parentIndex);%0A      %7D%0A    %7D%0A  %7D%0A  %0A
 %7D%0A

Implement MinHeap insert and siftUp methods.