Exemple #1
0
        public void PostorderTraversal(NodeStructureDFS node) //Postorder traversal way of DFS
        {
            if (node == null)
            {
                return;
            }

            PostorderTraversal(node.left);
            Console.Write(node.data + " ");
            PostorderTraversal(node.right);
        }
Exemple #2
0
        public NodeStructureDFS root;              // Root of the Binary Tree

        public DFS_RB()
        {
            root = null;
        }
Exemple #3
0
 public NodeStructureDFS(int item)
 {
     data = item;
     left = right = null;
 }