Пример #1
0
        public void SizeTest()
        {
            BinarySearchTree<int> bst = ConstructTree(5,4,8);
            Assert.AreEqual(3, bst.Size(bst.RootNode));

            bst = ConstructTree(5);
            Assert.AreEqual(1, bst.Size(bst.RootNode));

            bst = new BinarySearchTree<int>();
            Assert.AreEqual(0, bst.Size(bst.RootNode));
        }