/**
 * 
 * RBTree
 * 
 * An implementation of a Red Black Tree with
 * non-negative, distinct integer values
 * 
 */

public class RBTree {

  /**
   * public boolean empty()
   * 
   * returns true if and only if the tree is empty
   *  
   * preconditions: none
   * postcondition: return true iff the data structure does not contain any item
   */
  public boolean empty() {
    return false; // to be replaced by student code
  }

  /**
   * public boolean contains(int i)
   * 
   * returns true if and only if the tree contains i
   *  
   * preconditions: none
   * postcondition: returns true iff i is in the tree
   */
  public boolean contains(int i)
  {
	return false;  // to be replaced by student code
  }

  /**
   * public void insert(int i)
   * 
   * inserts the integer i into the binary tree; the tree
   * must remain valid (keep its invariants).
   * 
   * precondition:  none
   * postcondition: contains(i) == true (that is, i is in the list)
   */
   public void insert(int i) {
	  return;	// to be replaced by student code
   }
  
  /**
   * public void delete(int i)
   * 
   * deletes the integer i from the binary tree, if it is there;
   * the tree must remain valid (keep its invariants).
   * 
   * precondition:  none
   * postcondition: contains(i) == false (that is, i is in the list)
   */
   public void delete(int i)
   {
	   return;	// to be replaced by student code 
   }
   
   /**
    * public int min()
    * 
    * Returns the smallest key in the tree. If the tree
    * is empty, returns -1;
    * 
    * precondition: none
    * postcondition: none
    */
   public int min()
   {
	   return 42; // to be replaced by student code
   }
   
   /**
    * public int max()
    * 
    * Returns the largest key in the tree. If the tree
    * is empty, returns -1;
    * 
    * precondition: none
    * postcondition: none
    */
   public int max()
   {
	   return 42; // to be replaced by student code
   }
   
  /**
   * public int[] toIntArray()
   * 
   * returns an int[] array containing the values stored in the tree,
   * in ascending order.
   * 
   * preconditions: none
   * postconditions: returns an array containing exactly the tree's elements in
   *                 ascending order.
   */
  public int[] toIntArray()
  {
	 int[] arr = new int[42]; //
	 return arr; //	 to be replaced by student code
  }

   /**
    * public int maxDepth()
    * 
    * Returns the maximum depth of a node in the tree. If the tree
    * is empty, returns -1;
    * 
    * precondition: none
    * postcondition: none
    */
   public int maxDepth()
   {
	   return 42; // to be replaced by student code
   }

   /**
    * public int minLeafDepth()
    * 
    * Returns the minimum depth of a leaf in the tree. If the tree
    * is empty, returns -1;
    * 
    * precondition: none
    * postcondition: none
    */
   public int minLeafDepth()
   {
	   return 42; // to be replaced by student code
   }
  
   /**
    * public int avgDepth()
    * 
    * Returns the average depth of a node in the tree. If the tree
    * is empty, returns -1;
    * 
    * precondition: none
    * postcondition: none
    */
   public int avgDepth()
   {
	   return 42; // to be replaced by student code
   }

   /**
    * public int size()
    * 
    * Returns the number of nodes in the tree.
    * 
    * precondition: none
    * postcondition: none
    */
   public int size()
   {
	   return 42; // to be replaced by student code
   }

  /**
   * public class RBNode
   * 
   * If you wish to implement classes other than RBTree
   * (for example RBNode), do it in this file, not in 
   * another file 
   *  
   */
  public class RBNode{
	
  }
  
  /**
 * @original author Shai Vardi
 * Modified for semester 2009/2010 b
 */

}
  


