摘要: 6-12 二叉搜索树的操作集(30 分)本题要求实现给定二叉搜索树的5种常用操作。函数接口定义:BinTree Insert( BinTree BST, ElementType X );BinTree Delete( BinTree BST, ElementType ... 阅读全文
posted @ 2018-08-24 21:08 MCQ 阅读(328) 评论(0) 推荐(0) 编辑
摘要: 6-11 先序输出叶结点(15 分)本题要求按照先序遍历的顺序输出给定二叉树的叶结点。函数接口定义:void PreorderPrintLeaves( BinTree BT );其中BinTree结构定义如下:typedef struct TNode *Positio... 阅读全文
posted @ 2018-08-24 11:46 MCQ 阅读(687) 评论(0) 推荐(0) 编辑
摘要: #includeusing namespace std;typedef char ElementType;typedef struct TNode *Position;typedef Position BinTree;struct TNode{ ElementT... 阅读全文
posted @ 2018-08-24 10:54 MCQ 阅读(174) 评论(0) 推荐(0) 编辑