Beispiel #1
0
        public void DFSBinarySearchTreeInOrderRecursiveTest()
        {
            var binarySearchTree = new BinarySearchTreeKey();

            binarySearchTree.Add("4");
            binarySearchTree.Add("2");
            binarySearchTree.Add("6");
            binarySearchTree.Add("1");
            binarySearchTree.Add("3");
            binarySearchTree.Add("5");
            binarySearchTree.Add("7");

            Assert.Equal(new [] { "1", "2", "3", "4", "5", "6", "7" }, DFS.DFSBinarySearchTreeInOrderRecursive(binarySearchTree.Root));
        }