chap与ter 9 Binary Tree and General Tree.ppt

  1. 1、本文档共105页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
chap与ter 9 Binary Tree and General Tree

Chapter 9;Overview;Learning Objectives;Learning Objectives;Learning Objectives;9.1.1 Components Structure;A binary tree consists of nodes and branches. A node is a place in the tree where data is stored. There is a special node called the root. “starting point” of the tree. The nodes are connected to each other by branches. A left branch or right branch.;Binary means that there are at most two choices. A node is said to have at most two children. A node that does not have any children is called a leaf. Non-leaf nodes are called internal nodes. ;Parents and children Siblings Grandparents and progeniture There is a single path from any node to any other node in the tree. ;9.1.1 Components Structure;Structure Two binary trees with the same number of nodes may not have the same structure.;Depth is the distance from the root. Nodes at the same depth are said to be at the same level, with the root being at level zero. The height of a tree is the maximum level (or depth) at which there is a node.;Degree Degree of a node: the number of the branch down away from the node Degree of a tree: the maximum degree of the nodes in the tree n0=n2+1 The number of the leaves equals to the number of the nodes of degree 2 plus 1.;9.1.1 Components Structure;(a) first three are strictly binary, but the fourth is not.;At level i, there can be at most 2i nodes. Maximum number of nodes over all the levels. ;9.1.2 Position as Meaning;9.1.2 Position as Meaning;9.1.2 Position as Meaning;9.1.3 Recursive Definitions;1、空二叉树 2、只有根结点 3、左子树不空 4、右子树不空 5、左右子树都不空;9.1.3 Recursive Definitions;9.2 Binary Tree Traversals;9.2 Binary Tree Traversals;9.2 Binary Tree Traversals;A;9.2 Binary Tree Traversals;9.2 Binary Tree Traversals;9.2 Binary Tree Traversals;9.3 A Binary Tree Class;9.3 A Binary Tree Class;;A;Linked Binary Tree;;9.3 A Binary Tree Class;结点计数;高度计数;叶子结点删除(以二叉链表为存储结构);输出各结点层次;○;Non_recursive Inorder traversal;Non_recursive inorder traversal;Level traversal;;;9.4 Storing and Recreating a Binary T

文档评论(0)

junzilan11 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档