CDN加速镜像 | 设为首页 | 加入收藏夹
当前位置: 首页 资源下载 源码下载 数值算法/人工智能 数据结构常用算法

文件名称:Two-forks-tree-problem

  • 所属分类:
  • 标签属性:
  • 上传时间:
    2012-12-11
  • 文件大小:
    1.3kb
  • 已下载:
    0次
  • 提 供 者:
  • 相关连接:
  • 下载说明:
    别用迅雷下载,失败请重下,重下不扣分!
电信下载 联通下载
别用迅雷、360浏览器下载。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。

介绍说明--下载内容来自于网络,使用问题请自行百度

二叉树问题

1、 按根、左子树和右子树三部分进行遍历



遍历二叉树的顺序存在下面6种可能:



TLR(根左右), TRL(根右左)



LTR(左根右), RTL(右根左)



LRT(左右根), RLT(右左根)



其中,TRL、RTL和RLT三种顺序在左右子树之间均是先右子树后左子树,这与人们先左后右



的习惯不同,因此,往往不予采用。余下的三种顺序TLR、LTR和LRT根据根访问的位置不同分别



被称为先序遍历、中序遍历和后序遍历。



(1)先序遍历



若二叉树为空,则结束遍历操作;否则



访问根结点;



先序遍历左子树;



先序遍历右子树。



(2)中序遍历若二叉树为空,则结束遍历操作;否则



中序遍历左子树;



访问根结点;



中序遍历右子树。



(3)后序遍历



若二叉树为空,则结束遍历操作;否则



后序遍历左子树;



后序遍历右子树;



访问根结点。-1, according to the root, the left subtree and the right subtree traversal three partTraverse the two fork tree sequence there are 6 possible:TLR ( or so ), TRL ( root of right and left )LTR ( left radical right ), RTL ( right to left )LRT ( or root ), RLT ( right left root )Among them, TRL, RTL and RLT three kinds of sequence in the left and right subtree are to the right subtree after left subtree, and the first leftDifferent habits, therefore, are often not used. The remaining three order of TLR, LTR and LRT respectively according to root access locationKnown as the first traversal, preorder and postorder traversal.( 1) the first traversalIf the two fork tree is empty, then the end of traversal operation otherwiseAccess to the root node Preorder left subtree Preorder right subtree.( 2) in the traversal binary tree is empty if two, then the end of traversal operation otherwiseTraversal of the left subtree Access to the root node Traversal of the right subtree.( 3) after the travers
(系统自动生成,下载前可以参看下载内容)

下载文件列表

Two forks tree problem/二叉树问题(自创).txt
Two forks tree problem/问题描述.txt
Two forks tree problem

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 搜珍网是交换下载平台,只提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。更多...
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或换浏览器;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*快速评论: 推荐 一般 有密码 和说明不符 不是源码或资料 文件不全 不能解压 纯粹是垃圾
*内  容:
*验 证 码:
搜珍网 www.dssz.com

浏览历史记录

关闭