Example #1
0
        public void Minimum()
        {
            RBTree <int> testClass = GetTree();

            var result = testClass.GetMinimum();

            //  ____12_____
            // _5_   ____18___
            // 2 9 __15__   19
            //     13  17
            Assert.Equal(result.Value, 2);
            Assert.Equal(result.ParentNode.Value, 5);
            Assert.Null(result.LeftNode);
            Assert.Null(result.RightNode);
        }