Interview question: post-order traversal of a binary tree
typedef struct _TreeNode
{
struct _TreeNode* pLeft;
struct _TreeNode* pRight;
int data;
} TreeNode, *PTreeNode;
void BinaryTreePostorderTraversal(PTreeNode root)
{
static int max;
if(!root)
{
return;
}
BinaryTreePostorderTraversal(root->pLeft);
BinaryTreePostorderTraversal(root->pRight);
printf("%d\t", root->data);
}