示例#1
0
    public static void Main(string [] args)
    {
        Tree <int>   T1 = new Tree <int>(1, null, null);
        Tree <int>   T2 = new Tree <int>(3, null, null);
        Tree <int>   T3 = new Tree <int>(5, null, null);
        Tree <int>   T4 = new Tree <int>(7, null, null);
        Tree <int>   T5 = new Tree <int>(2, T1, T2);
        Tree <int>   T6 = new Tree <int>(6, T3, T4);
        Tree <int>   T7 = new Tree <int>(4, T5, T6);
        TreeIterator t  = new TreeIterator();

        t.display(T7);
    }