Binary Tree Preorder Traversal

Posted hujianglang

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Binary Tree Preorder Traversal相关的知识,希望对你有一定的参考价值。

typedef char ElemType;

typedef struct BiTreeNode

    ElemType data;
    struct BiTreeNode *left;
    struct BiTreeNode *right;
BiTreeNode,*BiTree;

Binary Tree Preorder Traversal

void TraverseBiTree(BiTree T)
    if(T == NULL)
        return;
    printf("%c",T->data);
    TraverseBiTree(T->left);
    TraverseBiTree(T->right);


//非递归方法待完善

 

以上是关于Binary Tree Preorder Traversal的主要内容,如果未能解决你的问题,请参考以下文章

144. Binary Tree Preorder Traversal

Binary Tree Preorder Traversal

144. Binary Tree Preorder Traversal

144. Binary Tree Preorder Traversal

144. Binary Tree Preorder Traversal

144. Binary Tree Preorder Traversal