Hihocoder后序遍历

#include 
using namespace std;
struct TreeNode
{
	struct TreeNode *left;
	struct TreeNode *right;
	char elem;
};
void BinaryTreePostOrder(char *inorder,char *preorder,int length)
{
	if (length==0)
	{
		return;
	}
	TreeNode *node=new TreeNode;
	node->elem=*preorder;
	int index=0;
	for (;indexelem;
	return;
}
int main()
{
	char *pre="AB";
	char *in="BA";
	BinaryTreePostOrder(in,pre,2);
	cout<

你可能感兴趣的:(Hihocoder后序遍历)