Exemplo n.º 1
0
 public string DFS(Node node, string res)
 {
     node.marked = true;
     string temp = string.Empty;
     foreach (Node n in node.getAdjNodes())
         if (!n.marked)
             temp += DFS(n, res);
     reversePost.Push(node);
     return node.name + temp;
 }