示例#1
0
        protected void PrintTree(Node root)
        {
            var iter = new InOrderTraversalIterator(root);

            foreach (Node node in iter)
            {
                Console.Write("{0} ", node.Data);
            }
            Console.WriteLine();
        }
示例#2
0
 protected void PrintTree(Node root)
 {
     var iter = new InOrderTraversalIterator(root);
     foreach (Node node in iter)
     {
         Console.Write("{0} ", node.Data);
     }
     Console.WriteLine();
 }