文件名称:Robson
-
所属分类:
- 标签属性:
- 上传时间:2012-10-02
-
文件大小:3.03kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
Robson遍历改进版:
这个课程设计的目的是进行一个罗布森遍历.
编写和测试的“修改”罗布森遍历程序使用链表代表的二叉树。
这一修改后的版本与原始的不同之处在于罗布森以一个节点的左指针指向左子树;现在修改版是反向。也就是说,当一个节点的左(右)子树正在走过,它的左(右)指针将指向其右(左)子树。在遍历,当一个节点访问,输出
每个栈的内容,它的右左指针。如此这样处理每个栈内元素。-Robson Traversal
Write and test a "modified" Robson Traversal program that uses the linked representation of the trees.
This modified version differs from the Robson only in that the pointers to a node s predecessor should
now be as in the Linked Inversion Traversal. That is, when a node s left(right) subtree is being traversed,
its left(right) pointer will point to its predecessor. During the traversal, when a node is visited, output
for each "stack entry, its info value and the info value of its left and right successors. This means, first,
output the number of the node Top points to, and then the number that that node s left and right pointers
point to. Then, output the number of the node that Stack points to,and then the numbers that that node s left
and right pointers point to. Do this for each node on the "stack"
这个课程设计的目的是进行一个罗布森遍历.
编写和测试的“修改”罗布森遍历程序使用链表代表的二叉树。
这一修改后的版本与原始的不同之处在于罗布森以一个节点的左指针指向左子树;现在修改版是反向。也就是说,当一个节点的左(右)子树正在走过,它的左(右)指针将指向其右(左)子树。在遍历,当一个节点访问,输出
每个栈的内容,它的右左指针。如此这样处理每个栈内元素。-Robson Traversal
Write and test a "modified" Robson Traversal program that uses the linked representation of the trees.
This modified version differs from the Robson only in that the pointers to a node s predecessor should
now be as in the Linked Inversion Traversal. That is, when a node s left(right) subtree is being traversed,
its left(right) pointer will point to its predecessor. During the traversal, when a node is visited, output
for each "stack entry, its info value and the info value of its left and right successors. This means, first,
output the number of the node Top points to, and then the number that that node s left and right pointers
point to. Then, output the number of the node that Stack points to,and then the numbers that that node s left
and right pointers point to. Do this for each node on the "stack"
相关搜索: robson
robson traversal
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Robson/
Robson/robson.h
Robson/tree4.txt
Robson/tree1.txt
Robson/tree2.txt
Robson/tree3.txt
Robson/robson_modified.cpp
Robson/robson.h
Robson/tree4.txt
Robson/tree1.txt
Robson/tree2.txt
Robson/tree3.txt
Robson/robson_modified.cpp
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.