http://blog.csdn.net/mxw976235955/article/details/39829973
http://www.tuicool.com/articles/zA7NJbj
/**
*morris中序遍历二叉树
*/
void morris_inorder(BiTree T) {
BNode *p, *temp;
p = T;
while(p) {
if(p->left == NULL) {
printf("%4c", p->ch);
p = p->right;
} else {
temp = p->left;
//找到左子树的最右子节点
while(temp->right != NULL && temp->right != p) {
temp = temp->right;
}
if(temp->right == NULL) {
temp->right = p;
p = p->left;
} else {
printf("%4c", p->ch);
temp->right = NULL;
p = p->right;
}
}
}
}