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;
  }

  protected void insert(int value) {
    if (!this.isEmpty()) {
      heapSize++;
      data[heapSize - 1] = value;
      siftUp(heapSize - 1);
    }
  }

  protected void siftUp(int index) {
    int parentIndex, tmp;
    if (index != 0) {
      parentIndex = getParentIndex(index);
      if (heapArray[parentIndex] > heapArray[index]) {
        tmp = heapArray[parentIndex];
        heapArray[parentIndex] = heapArray[index];
        heapArray[index] = tmp;
        siftUp(parentIndex);
      }
    }
  }
  
}

@@ -1,12 +1,60 @@
+%0A/* Implements the Min Heap data structure. */%0A%0A
 public class
@@ -716,20 +716,25 @@
 ;%0A      
-data
+heapArray
 %5BheapSiz
@@ -1139,13 +1139,11 @@
   %7D%0A  %7D%0A
-  
 %0A%7D%0A

Add class description.