All pastes #344995 Raw Edit

Mine

public text v1 · immutable
·published 2007-02-08 04:32 UTC
rendered paste body
/*
 * TernaryHeap.java
 * 
 * Version:
 *     $Id$
 *
 * Revisions:
 *     $Log$
 */

/**
 * Generic implementation of a ternary heap. Items are arranged such that
 * each item in heap is less than its children in the heap.
 *
 * @author <YOUR NAME>
 */

public class TernaryHeap<E extends Comparable<E>> {
     

   /**
         * Constructor of an empty heap
         * 
         * @param       init    An empty array of the appropriate type, 
         *                      large enough to hold the heap at all times
         */