/**
 * Company
 * Copyright (C) 2014-2017 All Rights Reserved.
 */
package com.cwenao.trying.tree;

/**
 * @author cwenao
 * @version $Id MaxTopHeapByArrays.java, v 0.1 2017-10-31 09:21 cwenao Exp $$
 */
public class MaxTopHeapByArrays {
}

@@ -232,9 +232,299 @@
 rays
- %7B
+%3CT extends Comparable%3E %7B%0A%0A    private T%5B%5D heaps;%0A%0A    private int n;%0A%0A%0A%0A    private boolean less(int i, int j) %7B%0A        return heaps%5Bi%5D.compareTo(heaps%5Bj%5D) %3C 0;%0A    %7D%0A%0A    private void exch(int i, int j) %7B%0A        T tmp = heaps%5Bi%5D;%0A        heaps%5Bi%5D = heaps%5Bj%5D;%0A        heaps%5Bj%5D = tmp;%0A    %7D%0A
 %0A%7D%0A

update the max top heap