game-ai/src/main/java/com/jzy/game/ai/util/BinaryHeap.java
/**
     * Insert an object into the heap.
     *
     * @param key a key
     */
Insert an object into the heap.
@param key a key
Insert an object into the heap . @param key a key
public void add(E key) {
        doubleCapacityIfFull();
        size++;
        elements[size] = key;
        percolateUp(size);
    }
public void add ( E key ) { doubleCapacityIfFull ( ) ; size ++ ; elements [ size ] = key ; percolateUp ( size ) ; }
Insert an object into the heap.
Insert an object into the heap .