Пример #1
0
        private static void Traverse(Node node, List<string> nodes, IEnumerable<Node> visited)
        {
            nodes.Add(node.Name);
            var children = node.Children();
            var one = children.Except(visited).FirstOrDefault();

            if(one != null)
            {
                visited = visited.Append(one);
                Traverse(one, nodes, visited);
                Traverse(node, nodes, visited);
            }

        }
Пример #2
0
 public static List<Node> WhereAreTheExists(Node node)
 {
     return node.Children();
 }