Пример #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);
        }
Пример #2
0
        public NodeStructureDFS root;              // Root of the Binary Tree

        public DFS_RB()
        {
            root = null;
        }
Пример #3
0
 public NodeStructureDFS(int item)
 {
     data = item;
     left = right = null;
 }