期刊文献+

二叉树结构的文本模式显示

Text-mode Display of Binary Tree
下载PDF
导出
摘要 二叉树在数据结构的教学中是非常重要的一类非线性结构,在上机编程和调试的过程中如何快速有效直观地显示这类非线性结构直接影响着教与学的效率,为此提出了一种文本模式的二叉树结构显示方法;该方法利用’-’、’/’和’\’三种特殊字符把子结点和父结点连接起来,使用队列对二叉树进行层序输出。在队列中采用空指针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.
作者 江顺亮 任燕 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)
关键词 二叉树 显示 文本模式 Binary tree display Text-mode
  • 相关文献

参考文献6

二级参考文献9

共引文献8

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部