摘要:
1.非递归,不允许用栈,求前序遍历最后一个结点思想:前序遍历最后一个结点:若有右子树,则为右子树最右下结点,若有左子树,则为左子树最右下结点,否则为根结点。#include "stdafx.h"#include<iostream>using namespace std;typedef struct BTreeNode{ int data; struct BTreeNode *lchild,*rchild;}BTree;int _tmain(int argc, _TCHAR* argv[]){ return 0;}BTree *LastNode(BTree *b) 阅读全文