コード例 #1
0
        private static void TestAvlTree()
        {
            var tree = new AvlTree <int>();
            var rnd  = new Random();

            for (int i = 0; i < 128; i++)
            {
                var number = rnd.Next(-100, 100);
                tree.Add(number);
                Console.WriteLine("number: {0}, tree size: {1}, tree height: {2}", number, tree.Count, tree.Height);
            }

            tree.GetOrdered();
        }