摘要:
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) 阅读全文
posted @ 2012-08-13 21:06
代码改变未来
阅读(1501)
评论(0)
推荐(0)
浙公网安备 33010602011771号