摘要: 1.将二叉树转换为顺序存储结构,按完全二叉树形式存储,无元素的结点当做虚结点。按层次顺序遍历二叉树,设根结点编号为0,设置一队列,将结点及其序号入队。出队时将结点及其编号写入顺序存储结构。#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;}typedef s 阅读全文
posted @ 2012-08-16 22:01 代码改变未来 阅读(2325) 评论(0) 推荐(0) 编辑