- 1、本文档共13页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
7.4比较树(国外英语资料)
7.4比较树(国外英语资料)
(also called decision tree algorithm of tree or search trees), the method is that the tracking algorithm, using tree nodes (we use the circle) to describe each key comparison. In the loop we place the index of the keys that are compared to the target key. The branch (line) is drawn down by the position of the circle, indicating the result of the comparison, and then marked as before. When the algorithm is over, we place the no or the target key in the appropriate branch. Were going to call it the leaf, in square. The leaf is sometimes called the tail or outer node of the tree. The remaining nodes are called inner nodes of the tree.
The comparison tree in the order lookup is especially simple, which is shown in figure 7.2.
A specific search algorithms do more times, is from the top of the tree (we call it the root) to an appropriate leaf within all traversal path between node number. The number of branches that are traversed from the root node to a node is called the height of the node. So the height of the root node is 0, and the height of the node that appears below it is 1, and so on.
The total number of nodes on the longest path in the tree is called the height of the tree. So a tree with only one node has a height of 1. In the following sections, we sometimes encounter empty trees, which are not nodes in the tree. We use the following rule that the height of an empty tree is 0.
In order to complete the term, when we use tree traditionally, we use the family tree tree metaphor biological: we call under immediate node node v v child, v node immediately above the node is called the parent v. So we can call it the parent of the leaf or the child of the root.
Analyze the tree at n = 10
1. The shape of the tree
On average, the number of comparisons to be done in each sequence is far more than binary search. This is evident in the comparison of the shape of their trees. Figure 7.3 and 7.4 are the trees of binary_search_1 and binary_search_2. The tree is
您可能关注的文档
- (转)美国人教你这样用Google,你真的会变特工~~~()(国外英语资料).doc
- (medical) the point of knowledge of the TXT ().((医学)断层解剖TXT版知识要点())(国外英语资料).doc
- (下末)五年级语文期末试卷((bottom) fifth grade Chinese final examination paper)(国外英语资料).doc
- (关节脱位、脊柱骨折)((joint dislocation, spinal fracture))(国外英语资料).doc
- - Oracle backup and recovery and use the problem set () in the Oracle9i process.(- Oracle备份与恢学习并使用Oracle9i过程中的问题集())(国外英语资料).doc
- 05-2-1. What kind of future can the Chinese wang reduce(05-2-1.汉王降价,能降出个怎样的未来)(国外英语资料).doc
- 03-3-5. Cloud computing makes the future full of imagination(03-3-5.云计算让企业未来充满想象)(国外英语资料).doc
- 02-hub (HUB)(02-HUB(集线器))(国外英语资料).doc
- 09防火墙(国外英语资料).doc
- 1-5年的积累背诵(国外英语资料).doc
- 浙江省临海市白云高级中学2025届高三历史3月月考试题.doc
- 云南拾谷县第一中学2024_2025学年高二物理上学期10月月考试题.doc
- 2025版高考生物总复习第13讲基因的分离定律教案苏教版.doc
- 湖北省黄石实验高中2024_2025学年高一历史下学期期末考试模拟卷.doc
- 通史版2025版高考历史大一轮复习专题七近代化的曲折发展__中日甲午战争至五四运动前4第4讲从维新思想到新文化运动课后达标检测含解析新人教版.doc
- 2024年高考数学考试大纲解读专题04导数及其应用含解析文.doc
- 河南省许汝平九校联盟2024_2025学年高一语文上学期期末考试试题扫描版无答案.doc
- 江西省吉安市吉水县第二中学2024_2025学年高一历史上学期第二次月考试题.doc
- 北京市平谷区2025届高三政治一模考试试题含解析.doc
- 2025届中考物理第四讲物态变化专项复习测试无答案新人教版.docx
文档评论(0)