20162314 《Program Design & Data Structures》Learning Summary Of The Seventh Week
20162314 2017-2018-1 《Program Design & Data Structures》Learning Summary Of The Seventh Week
Summary of Key Concepts
A tree is a nonlinear structure whose elements are organized into a hierarchy.
The order of a tree specifies the maximum number of children any node in the tree may have.
A balanced n-ary tree with m elements will have height log n m.
There are four basic techniques for traversing a tree.
A queue can be used to store the elements of a tree during a level-order traversal.
One strategy for implementing binary trees using arrays places the left child of element n at position (2 n * 1) and the right child at position (2*(n + 1)).
A stored link strategy for an array-based tree implementation allows array positions to be allocated contiguously regardless of the completeness of the tree.
How elements are added to and removed from a general binary tree depends on the tree’s purpose.
A decision tree can be used as the basis for an expert system.
Problem and solution in teaching materials.
Compare and contrast preorder and postorder tree traversals.?
Tree traversals visit each element in the tree. The type of traversal dictates when a node is visited. A preorder traversal visits the root before visiting either subtree, and a postorder traversal visits the root after visiting both subtrees.
What are the advantages and disadvantages of implementing binary trees using computed links?
The computed link strategy does not have to store the links between a parent to child node since that relationship is determined by its position in the array. However, this strategy may
lead to substantial wasted space for trees that are not balanced and/or not complete.
What is a decision tree?
A decision tree is a tree used to represent the questions and responses that can be used to determine an appropriate conclusion. A decision tree can be used as the basis of an expert system, such as a medical diagnosis system.
What is a binary tree?
It would take two dummy records in a doubly linked list, one at the front and one at the rear, to eliminate the special cases when dealing with the first and last node.
A binary tree is a tree whose nodes can have no more than two children. Binary trees are quite useful in many problem-solving situations.
Code hosting
Summary of error for last week.
Linear search is always more effective than binary search.The answer should be false, for the situation of "n = 2".
Evaluate for my partner
- Advantage and problem in the blog:
- Concise and comprehensie
- Uncleary to the content
- Mould is amazing
- Advantage and problem in the code:
- Serious writing.
- Wonderful idea
- Too less
Learning situation of partner
- Learning content of partner:
- Algorithm
- Recursion
- HanoiTowers and maze
Anything else that want to say
- It's not easy to persere on utizing English to write a blog.But I'm getting used to doing this because of the benefit.
Academic progress check
Code line number(increasing/accumulative) | Blog number(inc/acc) | studying time(inc/acc) | progress | |
---|---|---|---|---|
target | 5000lines | 30articles | 400hours | |
First week | 180/180 | 1/1 | 20/20 | |
Second week | 1049/1229 | 1/2 | 18/38 | |
Third week | 1037/2266 | 3/7 | 22/60 | |
Fourth week | 1120/3386 | 2/9 | 30/90 |
20162314 《Program Design & Data Structures》Learning Summary Of The Seventh Week的更多相关文章
- 20162314 《Program Design & Data Structures》Learning Summary Of The Ninth Week
20162314 2017-2018-1 <Program Design & Data Structures>Learning Summary Of The Ninth Week ...
- 20162314 《Program Design & Data Structures》Learning Summary Of The Fifth Week
20162314 2017-2018-1 <Program Design & Data Structures>Learning Summary Of The Fifth Week ...
- 20162314 《Program Design & Data Structures》Learning Summary Of The Second Week
20162314 2017-2018-1 <Program Design & Data Structures>Learning Summary Of The Second Week ...
- 20162314 《Program Design & Data Structures》Learning Summary Of The First Week
20162314 2017-2018-1 <Program Design & Data Structures>Learning Summary Of The First Week ...
- 20162314 《Program Design & Data Structures》Learning Summary Of The Eleventh Week
20162314 2017-2018-1 <Program Design & Data Structures>Learning Summary Of The Eleventh We ...
- 20162314 《Program Design & Data Structures》Learning Summary Of The Tenth Week
20162314 2017-2018-1 <Program Design & Data Structures>Learning Summary Of The Tenth Week ...
- 20162314 《Program Design & Data Structures》Learning Summary Of The Eighth Week
20162314 2017-2018-1 <Program Design & Data Structures>Learning Summary Of The Eighth Week ...
- 20182320《Program Design and Data Structures》Learning Summary Week9
20182320<Program Design and Data Structures>Learning Summary Week9 1.Summary of Textbook's Con ...
- 【Python学习笔记】Coursera课程《Python Data Structures》 密歇根大学 Charles Severance——Week6 Tuple课堂笔记
Coursera课程<Python Data Structures> 密歇根大学 Charles Severance Week6 Tuple 10 Tuples 10.1 Tuples A ...
随机推荐
- 单链表(c语言实现)贼详细
直接上代码吧 #include<stdio.h> #include<malloc.h> /* 单链表特点: 它是一种动态的储存结构,链表中每个节点占用的储存空间不是预先分配的, ...
- CANopen个人之所见,所想
一直想写一篇关于CANopen的文章,鉴于个人知识能力没有动笔,今天做了一番思想斗争,斗胆发表一下自己对CANOPEN的肤浅认识. 计划从销售人员,技术人员角度都分析一下CANopen的优势,文章可能 ...
- C++程序设计入门(上) 之对象和类
面向对象编程: 如何定义对象? 同类型对象用一 个通用的类来定义 class C { int p; int f(); }; C ca, cb; 一个类用变量来定义数据域,用函数定义行为. class ...
- PyCharm编辑HTML文件时输入{%不能自动补全
在PyCharm编辑HTML文件时输入Django模板语言时,发现录入 {% 不能自动补全. 找了一下,发现 setting 里可以设置 Python Template Languages,选择自己使 ...
- Hadoop(16)-MapReduce框架原理-自定义FileInputFormat
1. 需求 将多个小文件合并成一个SequenceFile文件(SequenceFile文件是Hadoop用来存储二进制形式的key-value对的文件格式),SequenceFile里面存储着多个文 ...
- 利用phar实行php反序列化命令执行(测试环境复现)
测试环境的过程大概是:构成出来的phar文件,并修改为任意后缀上传至服务器.通过index.php中存在的文件操作函数参数可控,把参数设置为 phar://上传文件名 即可导致命令执行. index. ...
- hbase、zookeeper及hadoop部署
一 机器192.168.0.203 hd203: hadoop namenode & hbase HMaster192.168.0.204 hd204: hadoop datanode &am ...
- xgboost: 速度快效果好的boosting模型
转自:http://cos.name/2015/03/xgboost/ 本文作者:何通,SupStat Inc(总部在纽约,中国分部为北京数博思达信息科技有限公司)数据科学家,加拿大Simon Fra ...
- CSS中padding、margin、bordor属性详解
一.图解CSS padding.margin.border属性 W3C组织建议把所有网页上的对像都放在一个盒(box)中,设计师可以通过创建定义来控制这个盒的属性,这些对像包括段落.列表.标题.图片以 ...
- 【windows server 2008R2】windows server 2008R2自动重启
客户反映2018.3.20早上8点多数据库重启. 我找了半天原因,看了一下告警日志没发现什么问题.后来我再跟他确认,他说他练上去的时候正在准备桌面.这感觉像是服务器重启导致数据库重启. 于是我远程上去 ...