/**
 * Heap
 */

public class Heap
{

    /**
     * public static boolean isHeap(int[] a, int heapsize)
     *
     * precondition: a != null
     *               a.length() >= heapsize
     * 
     * The function returns true if and only if the binary tree rooted at a[0]
     * satisfies the heap property or heapsize==0.
     *   
     */
    public static boolean isHeap(int[] a, int heapsize) 
    {
        return false; // just for illustration - should be replaced by student code
    }


    /**
     * public static int parent(i), left(i), right(i)
     * (3 methods)
     *
     * precondition: i >= 0
     *
     * The methods compute the index of the parent and right and left
     * childred of vertex i in a complete binary tree stored in an array.
     * Note that indices of arrays in Java start from 0.
     */
    public static int parent(int i) { return 999;} // just for illustration - should be replaced by student code
    public static int left  (int i) { return 999;} // just for illustration - should be replaced by student code
    public static int right (int i) { return 999;} // just for illustration - should be replaced by student code

    /**
    * public static void Insert(int[] a, int heapsize, int value)
    *
    * precondition: a != null
    *               a.length() >= heapsize+1
    *               value >= 0
    *               isHeap(a, heapsize)
    * 
    * postcondition: isHeap(a, heapsize+1)
    */
    public static void Insert(int[] a, int heapsize, int value) 
    {        
    	// should be replaced by student code
    }

    /**
    * public static void Delete_Min(int[] a, int heapsize)
    *
    * precondition: a != null
    *               a.length() >= heapsize
    *               heapsize >= 1
    *               isHeap(a, heapsize)
    * 
    * postcondition: isHeap(a, heapsize-1)
    */
    public static void Delete_Min(int[] a, int heapsize)
    {
     	// should be replaced by student code
    }


    /**
     * public static void Get_Min()(int[] a, int heapsize)
     *
     * precondition: a != null
     *               a.length() >= heapsize
     *               heapsize >= 1
     *               isHeap(a, heapsize)
     * 
     * postcondition: isHeap(a, heapsize)
     */
    public static int Get_Min(int[] a, int heapsize)
    {
	return 999;// should be replaced by student code
    }  
}

