/**
 * 
 * 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: none
    */
   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: none
    */
   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:  contains(i) == false (that is, i is not in the tree)
    * postcondition: contains(i) == true (that is, i is in the tree)
    */
   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; the tree
    * must remain valid (keep its invariants).
    * 
    * precondition:  contains(i) == true (that is, i is in the tree)
    * postcondition: contains(i) == false (that is, i is not in the tree)
    */
   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 boolean isLegalRedBlackTree()
    * 
    * returns true if and only if the tree is a legal red-black tree.
    * 
    * preconditions: none
    * postconditions: none
    */
   public boolean isLegalRedBlackTree()
   {
	   return false; // to be replaced by student code
   }
   

   /**
    * public int pred(int i)
    * 
    * returns the predecessor of an element. If the element has
    * no predecessor, returns -1.
    * 
    * preconditions: contains(i) == true (that is, i is in the tree)
    * postconditions: none
    */
   public int pred(int i)
   {
	   return 3542; // to be replaced by student code
   }
   
   
   /**
    * public int succ(int i)
    * 
    * returns the successor of an element. If the element has
    * no successor, returns -1.
    * 
    * preconditions: contains(i) == true (that is, i is in the tree)
    * postconditions: none
    */
   public int succ(int i)
   {
	   return 3542; // to be replaced by student code
   }

   
   /**
    * public boolean isComplete()
    * 
    * returns true if and only if the tree is a complete binary tree.
    * 
    * preconditions: none
    * postconditions: none
    */
   public boolean isComplete()
   {
 	  return false; // 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 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
 * @additions by Eran Matityahu
 */

}
  


