Ejemplo n.º 1
0
        public void DFS1()
        {
            var dfs  = new DFS <int>();
            var tree = BuildBunchOfIntNodes();

            Assert.False(dfs.Contains(tree, 1));
            Assert.False(dfs.Contains(null, 1));
            Assert.True(dfs.Contains(tree, 10));
            Assert.True(dfs.Contains(tree, 45));
            Assert.True(dfs.Contains(tree, 25));
            Assert.False(dfs.Contains(tree, 125));
        }