Ejemplo n.º 1
0
        private static void Main(string[] args)
        {
            Console.WriteLine("Enter a collection of numbers in the range [0,100], seprated by spaces: ");
            var userInput = Console.ReadLine();
            var tempArray = userInput.Split(' ');

            string[] inputArray = new HashSet <string>(tempArray).ToArray(); // removing duplicates
            BST      firstTree  = new BST();

            for (int i = 0; i < inputArray.Length; i++)
            {
                firstTree.Insert(int.Parse(inputArray[i]));
            }

            firstTree.TreeStatistcis();
        }