Пример #1
0
  private static void heapify(int[] a) {

    int startIndex = Heap.findParent(a.length - 1);

    while (startIndex >= 0) {
      siftDown(a, startIndex--, a.length);
    }
  }