Example #1
0
        static void Main(string[] args)
        {
            int[] a = { 8, 4, 12, 2, 6, 10, 14 };

            ///////////////////////
            //         8         //
            //     /       \     //
            //    4        12    //
            //  /   \     /   \  //
            // 2     6   10   14 //
            ///////////////////////

            BST1 <int> bst = new BST1 <int>();

            for (int i = 0; i < a.Length; i++)
            {
                bst.Add(a[i]);
            }

            bst.Remove(10);
            bst.InOrder();

            Console.WriteLine();

            bst.Remove(6);
            bst.InOrder();

            Console.Read();
        }
Example #2
0
 public void Remove(E e)
 {
     bst.Remove(e);
 }