检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
作 者:江顺亮[1] 任燕[1] JIANG Shun-liang, R.EN Yang (Department of Computer Science and Technology, School of Information Engineering, Nanchang University, Nanchang 330031, China)
出 处:《电脑知识与技术》2012年第6期3856-3860,共5页Computer Knowledge and Technology
基 金:国家自然科学基金(50863003,61163023)
摘 要:二叉树在数据结构的教学中是非常重要的一类非线性结构,在上机编程和调试的过程中如何快速有效直观地显示这类非线性结构直接影响着教与学的效率,为此提出了一种文本模式的二叉树结构显示方法;该方法利用’-’、’/’和’\’三种特殊字符把子结点和父结点连接起来,使用队列对二叉树进行层序输出。在队列中采用空指针NULL代表空结点,同时用一个新结点end表示每一层的结束。该方法不仅适用于顺序存储的二叉树也适用于链式存储的二叉树,进行适当修改也可顺利地显示3阶B一树,因此可以作为数据结构教与学的有效手段之一。Binary tree is very important nonlinear structure in the data structures, how to display the binary tree effectively is essential to the related teaching and learning. A text-mode display method for binary tree was proposed, three characters ('_', '/' and '/ ') were used to connect the parent and children nodes, queue technique was used to export binary tree by level-order, the empty node is represented by the NULL pointer and one new node is created to denote the end of one level in the level-order queue. The method is usable for both of sequence and linked binary trees, is applicable for display of 3-order B_tree by small modification, and is valuable to improve the teaching and learning.
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:216.73.216.227