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