首页 | 本学科首页   官方微博 | 高级检索  
     

基于链栈数组的二叉树按层遍历递归算法
引用本文:尹帮治.基于链栈数组的二叉树按层遍历递归算法[J].重庆科技学院学报(自然科学版),2009,11(3).
作者姓名:尹帮治
作者单位:河源市广播电视大学,河源,517000
摘    要:二叉树按层遍历即按照二叉树的层次结构进行遍历,是指按照从根结点到叶子结点、同一层从左到右的次序访问一棵二叉树中的所有结点,并且每个结点的值域(Data)仅被访问一次的过程.分析了基于链栈数组的二叉树按层遍历递归算法的主要思想的3种形式,然后采用C++语言对该算法进行描述,用链栈数组对该算法予以实现.

关 键 词:二叉树  按层遍历  递归  链栈数组  算法

A Recursive Algorithm of Traversing Binary Tree by Level Based on Chain-stack Array
YIN Bang-zhi.A Recursive Algorithm of Traversing Binary Tree by Level Based on Chain-stack Array[J].Journal of Chongqing University of Science and Technology:Natural Science Edition,2009,11(3).
Authors:YIN Bang-zhi
Affiliation:Heyuan Radio and TV University;Heyuan 517000
Abstract:Traversing a binary tree by level(traversing a binary tree according to its hierarchical structure) is a process in which it visits all the nodes in a binary tree from root node to leaf node and from left to right at the identical level with each node's data field visited only once.First,the paper analyzes the three forms of main ideas of the recursion algorithm of traversing binary tree by level based on China-stack array.Second,it describes the algorithm in details using C++ language.Finally,the algorithm...
Keywords:binary tree  level traversal  recursive  chain-stack array  algorithm  
本文献已被 CNKI 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号