static void Main(string[] args) { BST b = new BST(); for (int i = 0; i < 10; i++) { b.Add(i); } }
static void Main(string[] args) { //create a tree //source: http://msdn.microsoft.com/en-us/library/aa289150(v=vs.71).aspx BST tree = new BST(); //split a phrase by space characters List<string> words = new List<string>("buy a motorcycle and go fishing".Split(' ')); words.Remove(String.Empty); //phrase is not alphabetized. insert into tree foreach (string word in words) { tree.Add(word); } try { RecursiveTest(tree, words); Console.WriteLine("Test succeeded"); } catch (Exception) { Console.WriteLine("Test failed"); } }