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的更多相关文章

  1. 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 ...

  2. 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 ...

  3. 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 ...

  4. 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 ...

  5. 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 ...

  6. 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 ...

  7. 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 ...

  8. 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 ...

  9. 【Python学习笔记】Coursera课程《Python Data Structures》 密歇根大学 Charles Severance——Week6 Tuple课堂笔记

    Coursera课程<Python Data Structures> 密歇根大学 Charles Severance Week6 Tuple 10 Tuples 10.1 Tuples A ...

随机推荐

  1. 学好linux必须精通用户管理的章节知识

    第12章 Linux中用户知识管理 12.1 系统开机启动流程 12.1.1 centos6系统开机启动流程 12.1.1.1 开机系统流程语言描述 服务器电源开关打开 bios自检 目的:检查硬件是 ...

  2. zabbix自动发现与自动注册、自定义监控

    一.自动发现与自动注册在上面的介绍中,我们演示了手动添加一台主机的方法,虽然简单,但是当要添加的主机非常多时,也将变得非常繁琐,那么有没有一种方法,可以实现主机的批量添加呢,这样就会极大的提高运维效率 ...

  3. word2vec用到的c语言知识

    argc,avgv用法 argc 表示有几个参数,因为至少要指定一个应用程序的名,所以argc>=1. argv表示参数是什么. int main(int argc, char **argv) ...

  4. Orleans 初接触

    简介 这篇随笔主要记录了自己学习Orleans的经过和理解,在学习过程中会一直更新,思路和理解可能有些偏颇,如果有幸有大佬看到这篇文章,希望能给予批评指正. 导航 (一) 入门例子 (二) 测试用例 ...

  5. 基于 Blazui 的 Blazor 后台管理模板 BlazAdmin 正式尝鲜

    简介 BlazAdmin 是一个基于Blazui的后台管理模板,无JS,无TS,非 Silverlight,非 WebForm,一个标签即可使用. 我将在下一篇文章讨论 Blazor 服务器端渲染与客 ...

  6. Java堆的结构是什么样子的?什么是堆中的永久代(Perm Gen space)?

    JVM的堆是运行时数据区,所有类的实例和数组都是在堆上分配内存.它在JVM启动的时候被创建.对象所占的堆内存是由自动内存管理系统也就是垃圾收集器回收. 堆内存是由存活和死亡的对象组成的.存活的对象是应 ...

  7. ubuntu16.04没有办法使用CRT,或者SSH工具的解决办法

    首先要明确一点,ubuntu16.04是默认没有安装SSH工具的 情况1 首先需要切换到root模式,然后在进行安装 设置root密码 sudo passwd 然后  sudo apt-get ins ...

  8. 推荐使用的派生方法:super().__init__()

    """ 推荐使用的派生方法:super().__init__() --super()的属性查找顺序是从当前位置开始找,根据mro列表,当前没有就往上找. super() ...

  9. 基于C# WPF框架的贪吃蛇

    游戏开始界面 游戏开始 共有两条蛇,吃到红色食物加1分,吃到绿色毒食物减1分,知道0不减: 碰到墙壁游戏结束,碰到对方游戏结束,碰到自己游戏结束 此游戏通过Canvas画布布局,通过C#代码实现 游戏 ...

  10. 小程序 wx.request请求

    1.wx.request相当于发送ajax请求 微信官方解释 参数 属性 类型 默认值 必填 说明 url string 是 开发者服务器接口地址 data string/object/ArrayBu ...