Example #1
0
        public void GetMinMaxTest()
        {
            RedBlackTreeWithIndexAccess tree = new RedBlackTreeWithIndexAccess();

            for (int i = 0; i < 1000; i++)
            {
                tree.RB_Insert(i);
            }
            int min = (int)tree.GetMinimum();

            Assert.AreEqual(0, min);
            int max = (int)tree.GetMaximum();

            Assert.AreEqual(999, max);
        }