using System.Collections.Generic;
static IEnumerable<Node> BFS(Node root)
foreach (var n in BFS(root))
foreach (var c in n.Children)
foreach (var node in BFS(tree))
Console.WriteLine(node.Value);
public Node(int value, params Node[] children)
public int Value { get; }
public Node[] Children { get; }