20182320《Program Design and Data Structures》Learning Summary Week9
20182320《Program Design and Data Structures》Learning Summary Week9
1.Summary of Textbook's Content
1.1 Chapter 15:Tree
1.1.1 Concept of Tree:
'Tree' is a data sturcture,which is non-linear. It consists of nodes and edges.

1.1.2 Some important concepts:
The only top node is called root.For example,in the picture above,A is the root of the tree.
The nodes connected with nothing is called leaf.For example,in the picture above,nodes with '#' are all leaves of the tree.
When a node's top is connected to another node,we define that the latter one is the parent of the former one.For example,in the picture above,A is the parent of B and C.
When a node's bottom is connected to other node(s),we define that the latter one(s) is(are) child(children) of the former one.For example,in the picture above,B and C are children of B and C.
When some nodes are in the same layer,like D and E in the picture,we call that they are siblings of each other.
When a tree is a part of another tree,we called the former one the subtree of the latter one.
A node's path length means the number of edges traveled by the path from root to the node.
The height/depth of a tree means the length of the longest path in a tree from its root to leaves.
A tree's order means the number of the children of a node that has the most children.
When the most children of a tree's nodes is n,we called the tree n-ary tree.
1.1.3 Traversal
(1)preorder traversal
Access the root first and then access other nodes from left to right.
(2)inorder traversal
Access the left subtree first,then access the root,the last is the right subtree.
(3)postorder traversal
Similar with the traversals above,but access the root last.
1.2 Chapter 16:Binary Search Tree
1.2.1 Concept of Binary Search Tree:
Binary Search Tree is originated from Tree,but has a rule about the arrangements of the contents.
The rule is: When we set a root here, the node that has a smaller element than the root's,should be set as the leftnode of the root.And on the contrary, a node with a bigger element should be set as the rightnode of the root.It goes all the way down according to this rule.
2.Problems and Solutions in Textbook's Learning
Problem 1:
When it comes to the implements of LinkedBinaryTree,the codes in the textbook involves some knowledge of Iterator,which made me confused.
Solution 1:
CSDN:

From here I learned that Iterator is a great way of implementing Tree Traversal.
3.Problems and Solutions in Code Debugging
Problem 1:
When programming PP16.6,the programme just stopped after outputting a single line.

Solution 1:
The problem was found as below:


Code Management

Summary of Mistakes in Exams(Last Week)
Mistake 1:
Typically, in heap implementations, we keep track of the position of the last node or, more precisely, the last leaf in the tree.
A.root
B.internal node
C.leaf
D.tree
Correct Answer:C
Mistake by:A
Conclusion 1:
Just because of carelessness.
Mutual Evaluation
Commented Blogs
- Mutual Blog Evaluation(This Week)
- 20182307
- Paring Study Details
- Tree
- BinarySearchTree
- Mutual Blog Evaluation(Last Week)
Others
Since Tree is a non-linear data structure,it took me a lot of time to comprehend it.Tree has some advantages in searching and sorting,but its travesal,especially when implemented by Inheritance,still requires further study to make sense of.
Progress Bar
| CodeLines(New/Accumulation) | Blogs' number(New/Accumulation) | Learning hours(New/Accumulation) | Important progress | |
|---|---|---|---|---|
| Goal | 10000 lines | 30 blogs | 400 hours | |
| Week1 | 208/208 | 2/2 | 9/9 | |
| Week2 | 258/466 | 2/4 | 15/24 | |
| Week3 | 693/1159 | 2/6 | 22/46 | |
| Week4 | 1383/2542 | 2/8 | 30/76 | |
| Week5 | 1300/3842 | 2/10 | 22/98 | |
| Week6 | 1998/5840 | 2/12 | 24/122 | |
| Week7 | 2901/8741 | 2/14 | 30/152 | |
| Week8 | 3556/12297 | 2/16 | 30/182 |
20182320《Program Design and Data Structures》Learning Summary Week9的更多相关文章
- 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 Seventh Week
20162314 2017-2018-1 <Program Design & Data Structures>Learning Summary Of The Seventh Wee ...
- 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 ...
- 【Python学习笔记】Coursera课程《Python Data Structures》 密歇根大学 Charles Severance——Week6 Tuple课堂笔记
Coursera课程<Python Data Structures> 密歇根大学 Charles Severance Week6 Tuple 10 Tuples 10.1 Tuples A ...
随机推荐
- TypeScript - 类型声明、枚举、函数、接口
目录 可定义的类型 类型声明 枚举 函数 接口 可定义的类型 以下所写的并不代表typescript的数据类型,而是在使用过程中可以用作定义的类型 number : 数值类型: string ...
- 微信小程序 buton清除默认样式
相信很多小伙伴在开发小程序的时候都会碰到小程序Button默认样式的困扰,在重设样式的时候需要一次次的设置 分享一个自己在开发中的小方法: CSS all 简写属性 将除 unicode-bidi 与 ...
- 【JS】285- 拆解 JavaScript 中的异步模式
JavaScript 中有很多种异步编程的方式.callback.promise.generator.async await 甚至 RxJS.我最初接触不同的异步模式时,曾想当然的觉得 promise ...
- java发送邮件基础方法(另附部分主流邮箱服务器地址、端口及设置方法)
java发送邮件基础方法,可通过重载简化参数 import java.io.File; import java.io.UnsupportedEncodingException; import java ...
- 为什么要使用MQ消息中间件?这3个点让你彻底明白!
前言 一个用消息队列的人,不知道为啥用,有点尴尬.没有复习这点,很容易被问蒙,然后就开始胡扯了. 回答:这个问题,咱只答三个最主要的应用场景,不可否认还有其他的,但是只答三个主要的,即以下六个字: 解 ...
- Android(常用)主流UI开源库整理
这几天刚做完一个项目..有点空余时间,就想着吧这一两年做的项目中的UI界面用到的一些库整理一下.后来想了一下,既然要整理,就把网上常用的 AndroidUI界面的主流开源库 一起整理一下,方便查看. ...
- XML字符串转为Map集合
public class xmlToMapUtils { /** * xml字符串转为map集合 * @param xmlStr * @return */ public static Map<S ...
- C++错误unresolved external symbol _WinMain@16
C++错误unresolved external symbol _WinMain@16 Linking... LIBCD.lib(wincrt0.obj) : error LNK2001: unre ...
- 虚拟化和Docker
1.硬件层的虚拟化具有高性能和隔离性,因为hypervisor直接在硬件上运行,有利于控制VM的OS访问硬件资源,使用这种解决方案的产品有VMware ESXI和Xen server. 2.hyper ...
- [ASP.NET Core 3框架揭秘] 文件系统[3]:物理文件系统
ASP.NET Core应用中使用得最多的还是具体的物理文件,比如配置文件.View文件以及作为Web资源的静态文件.物理文件系统由定义在NuGet包"Microsoft.Extension ...