static void Main(string[] args) { BSTree tree = new BSTree(); List <int> list = new List <int> { 1, 2, 3 }; foreach (int value in list) { tree.Insert(value); } //int x; }
public static void Main() { BSTree myTree = new BSTree(); for (int i = 0; i < 10; i++) { myTree.Add(i); } myTree.Add(2312323); Console.WriteLine(myTree); Console.WriteLine(myTree.Search(2312323)); BSTree newTree = myTree.Clone(); newTree.Add(-5); Console.WriteLine(myTree); Console.WriteLine(newTree); }