检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
机构地区:[1]武汉轻工大学数学与计算机学院,湖北武汉430023
出 处:《武汉工业学院学报》2013年第3期53-57,共5页Journal of Wuhan Polytechnic University
基 金:国家自然科学基金项目(61179032)
摘 要:针对目前建立二叉树存在算法复杂、执行速度慢的问题,提出一种新的二叉树生成算法。主要采用二叉排序树的思想,并结合二叉树遍历的特点,通过先对中序遍历依次编号,然后按先序遍历或后序遍历的元素及编号建立二叉排序树。实验表明,该方法具有执行速度快、程序实现简单、通用性好的特点。According to the problem of the complex algorithm to establish binary trees and its slow speed, this paper presents a new algorithm generation to creates the binary tree. The algorithm is mainly adopting the thought to creat the binary sort tree, and connecting the thought of the binary tree traverse characteristics. After the mid-traverse sequence with the numbers, it builds the binary sort tree according to the elements and numbers of the pre-traverse sequence or the post-traverse sequence. Because the nature of the algorithm is to establish the binary sort tree, so it is superior to the other algorithm to establish the binary tree either in program realization or in time complexity. The test result shows that this method has quick execution speed, and the program implementation is simple, the good characteristic is universal.
分 类 号:TP311.12[自动化与计算机技术—计算机软件与理论]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:216.73.216.7