登录
首页 » 数据结构 » 红黑树:输入:在同一目录下的redblacktree.txt文件中输入十个大于0的数值,每个数值中间用空格格开 数目可以大于十个,但是要求在源程序中改变#def...

红黑树:输入:在同一目录下的redblacktree.txt文件中输入十个大于0的数值,每个数值中间用空格格开 数目可以大于十个,但是要求在源程序中改变#def...

于 2022-06-11 发布 文件大小:53.39 kB
0 216
下载积分: 2 下载次数: 1

代码说明:

红黑树:输入:在同一目录下的redblacktree.txt文件中输入十个大于0的数值,每个数值中间用空格格开 数目可以大于十个,但是要求在源程序中改变#define NUM 10 ,改成相应关键值各个数输出:按照先序输出红黑树,格式为:根节点。颜色(左子树。颜色,右子树。颜色),并输出此 树的黑高度,然后输入要删除的关键值,按回车后输出删除后的结果,并输出其高度。-RED-BLACK TREE : Admission : in the same directory under the file input redblacktree.txt greater than 0 10 digits each intermediate numerical grid with open spaces can be greater than the number 10, but requested change in the source# define NUM 10, the corresponding critical value into several different output : In accordance with the first sequence RED-BLACK TREE output format : nodes. Color (left subtree. Color, right subtrees. Color), and export of the black tree height and then delete the key to value, according to enter the output was the result of the deletion, and its high output.

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 控件datagridSource
    控件datagridSource-Control datagridSource
    2022-03-15 12:25:35下载
    积分:1
  • 1.[问题描述] 编写递归算法,计算二叉树中叶子结点的数目 [输入] 按照先序序列的顺序输入该结点的内容。其输入abd eh cf i g ....
    1.[问题描述] 编写递归算法,计算二叉树中叶子结点的数目 [输入] 按照先序序列的顺序输入该结点的内容。其输入abd eh cf i g . [输出] 按中序序列输出,输出的结果为;dbheaficg并计算出二叉树中叶子结点的数目为4 [存储结构] 采用二叉表存储 [算法的基本思想] 采用递归方法建立和遍历二叉树。首先建立二叉树的根结点,然后建立其左右子树,直到空子树为止,中序遍历二叉树时,先遍厉左子树,后遍厉右子树,最后访问根结点。根据左右子树的最后一个结点计算出二叉树中叶子结点的数目。 程序如下: #include #include #include"stdlib.h" -1. [Description of the issue] to prepare recursive algorithm, Binary calculation leaves the number of nodes [imported] in accordance with the first order input sequence in the order of the node contents. Input abd eh i g cf. [Output] by the order sequence output, the results of the output; dbheaficg calculated Binary leaf node to the number four [storage structure] Table 2 forks storage [ The basic idea algorithm] recursive method and traverse binary tree. First established binary tree root node, and then to build their son around the tree, the tree until the loopholes, which preorder binary tree, Li first times the left sub-tree, right af
    2023-08-31 16:00:04下载
    积分:1
  • 贝尔曼
    Bellman-Ford算法 是最短路径算法的一种-Bellman-Ford algorithm is the shortest path algorithm of a
    2022-03-01 10:39:59下载
    积分:1
  • 数值计算的源代码,包括二分法,和弦表,肺伯格算法…
    数值计算源代码,包括二分法,弦截法,龙贝格算法,下山法,牛顿迭代法-numerical source code, including the dichotomy, chord sheet, Lung Bergh algorithm, the mountain, the Newton iterative method
    2022-05-18 20:34:13下载
    积分:1
  • 数 据 结 构 大型 作业3.1输入一个数列L,生成一棵二叉排序树T;3.2对二叉排序树T作中序遍历,输出结果;3.3计算二叉排序树T的平均查找长度, 输出结果...
    数 据 结 构 大型 作业3.1输入一个数列L,生成一棵二叉排序树T;3.2对二叉排序树T作中序遍历,输出结果;3.3计算二叉排序树T的平均查找长度, 输出结果;3.4判断二叉排序树T是否为平衡二叉树,输出信息“OK!”/“NO!”;3.5再使用上述数列L,生成平衡的二叉排序树BT,每当插入新元素,发现当前的二叉排序树BT不是平衡的二叉排序树,则立即将它转换成新的平衡的二叉排序树BT;3.6计算平衡的二叉排序树BT的平均查找长度,输出结果。3.6分析对比未平衡化的二叉排序树和平衡的二叉排序树的查找效率(最好、最坏平均比较关键字数)-data structure large operations into a 3.1 L series, generating a binary tree Sort T; 3.2 pair of two fork-tree T for medium preorder, output results; 3.3 Ranking calculation Binary Tree Search T"s average length of the output; 3. four judgment ordering two trees T fork whether balanced binary tree, the output message "OK!"/"NO!" ; again using the 3.5 series L, generate balanced binary tree sort BT, whenever insert a new element, found the current binary sort tree is not-BT Value of two binary sort tree, it will be immediately converted into the new balance of the two fork-tree BT; 3.6 Calculation balanced binary tree sort BT search length of the average output results. 3.6 Comparative Analysis of
    2022-04-09 01:41:30下载
    积分:1
  • C++ 控制MYSQL数据库 源码
    利用C++对MYSQL进行数据读,写,及修改. 需要有mysql.h 头文件   数据库结名为person, 表名为 mm, 表结构如下:  字段             类型 device_id       int sav_value      int sav_date        datetime
    2022-04-11 07:39:31下载
    积分:1
  • Fibonacci数列的c语言实现
    Fibonacci数列的c语言实现-Fibonacci Sequence C Language
    2022-11-27 15:00:03下载
    积分:1
  • 归并外排序,要先运行file程序,在硬盘上建立dat文件,再运行排序程序...
    归并外排序,要先运行file程序,在硬盘上建立dat文件,再运行排序程序-ranking first run file procedures, the establishment of dat drives on paper, sorting operation procedures
    2022-09-21 13:05:04下载
    积分:1
  • 把源文件拷贝入code.txt,运行此程序后,所得软件在code.txt中
    把源文件拷贝入code.txt,运行此程序后,所得软件在code.txt中-put source files are copied into code.txt, running this program, from which software code.txt
    2022-03-10 04:53:29下载
    积分:1
  • Data structure the curriculum design issues welcome maze download
    数据结构 课程设计 迷宫问题 欢迎下载-Data structure the curriculum design issues welcome maze download
    2022-12-18 14:05:03下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载