@Test public void testHeapifyShouldWork() throws Exception { final List<Integer> values = generateUniqueIntList(100); assertHeapIsCorrect(heapify(values.toArray(new Integer[100]))); }
@Nonnull static <T extends Comparable<T>> ArrayBinaryHeap<T> heapify(@Nonnull T[] array) { return heapify(array, Collections.<T>naturalComparator()); }
ArrayBinaryHeap { @Nonnull static <T extends Comparable<T>> ArrayBinaryHeap<T> heapify(@Nonnull T[] array) { return heapify(array, Collections.<T>naturalComparator()); } }
ArrayBinaryHeap { @Nonnull static <T extends Comparable<T>> ArrayBinaryHeap<T> heapify(@Nonnull T[] array) { return heapify(array, Collections.<T>naturalComparator()); } private  ArrayBinaryHeap(int height, @Nonnull Comparator<T> comparator);   ArrayBinaryHeap(@Nonnull T[] array, @Nonnull Comparator<T> comparator); }
ArrayBinaryHeap { @Nonnull static <T extends Comparable<T>> ArrayBinaryHeap<T> heapify(@Nonnull T[] array) { return heapify(array, Collections.<T>naturalComparator()); } private  ArrayBinaryHeap(int height, @Nonnull Comparator<T> comparator);   ArrayBinaryHeap(@Nonnull T[] array, @Nonnull Comparator<T> comparator); @Nonnull T getRoot(); int getRootIndex(); int getSize(); boolean isValidIndex(int index); static void heapSort(@Nonnull T[] a, @Nonnull Comparator<? super T> c); }
ArrayBinaryHeap { @Nonnull static <T extends Comparable<T>> ArrayBinaryHeap<T> heapify(@Nonnull T[] array) { return heapify(array, Collections.<T>naturalComparator()); } private  ArrayBinaryHeap(int height, @Nonnull Comparator<T> comparator);   ArrayBinaryHeap(@Nonnull T[] array, @Nonnull Comparator<T> comparator); @Nonnull T getRoot(); int getRootIndex(); int getSize(); boolean isValidIndex(int index); static void heapSort(@Nonnull T[] a, @Nonnull Comparator<? super T> c);  }