示例#1
0
        public DepthFS() : base(false)
        {
            var n       = BreadthFS.SampleData();
            var current = n.Nodes['a'];

            Queuer.Add(current);
            current.hasVisited = true;
            Transverse(current);
            Console.WriteLine(result);
        }
示例#2
0
        public BreadthFS(bool run)
        {
            if (!run)
            {
                return;
            }
            var n       = BreadthFS.SampleData();
            var current = n.Nodes['a'];

            Queuer.Add(current);
            current.hasVisited = true;
            Transverse(current);
            Console.WriteLine(result);
        }