码迷,mamicode.com
首页 > 其他好文 > 详细

对树的操作(二叉树)

时间:2014-11-02 22:18:20      阅读:197      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   sp   strong   on   2014   log   

对二叉树的遍历:

  先序遍历:【先访问根节点】

      先访问根节点,

      再先序访问左子树,

      再先序访问右子树;  ————递归关系

  中序遍历:【中间访问根节点】

      中序遍历左子树,

      再访问根节点,

      再中序遍历右子树;  ————递归关系

  后序遍历:【最后访问根节点】

      先中序遍历左子树,

      再中序遍历右子树,

      再访问根节点;    ————递归关系

                          bubuko.com,布布扣

 

对树的操作(二叉树)

标签:style   blog   http   color   sp   strong   on   2014   log   

原文地址:http://www.cnblogs.com/chris-cp/p/4069939.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!